Name Description Size
components.conf 875
metrics.yaml 1780
moz.build 1305
Push.manifest 156
Push.sys.mjs The Push component runs in the child process and exposes the Push API to the web application. The PushService running in the parent process is the one actually performing all operations. 9543
PushBroadcastService.sys.mjs Convert the listeners from our on-disk format to the format needed by a hello message. 8695
PushComponents.sys.mjs This file exports XPCOM components for C++ and chrome JavaScript callers to interact with the Push service. 15178
PushCrypto.sys.mjs Localized error property names. 25790
PushDB.sys.mjs @param aRecord The record to be added. 12975
PushManager.cpp 17754
PushManager.h PushManager and PushSubscription are exposed on the main and worker threads. The main thread version is implemented in Push.js. The JS implementation makes it easier to use certain APIs like the permission prompt and Promises. Unfortunately, JS-implemented WebIDL is not supported off the main thread. To work around this, we use a chain of runnables to query the JS-implemented nsIPushService component for subscription information, and return the results to the worker. We don't have to deal with permission prompts, since we just reject calls if the principal does not have permission. On the main thread, PushManager wraps a JS-implemented PushManagerImpl instance. The C++ wrapper is necessary because our bindings code cannot accomodate "JS-implemented on the main thread, C++ on the worker" bindings. PushSubscription is in C++ on both threads since it isn't particularly verbose to implement in C++ compared to JS. 3909
PushNotifier.cpp 14259
PushNotifier.h `PushDispatcher` is a base class used to forward observer notifications and service worker events to the correct process. 6079
PushRecord.sys.mjs The push subscription record, stored in IndexedDB. 9376
PushService.sys.mjs State is change only in couple of functions: init - change state to PUSH_SERVICE_INIT if state was PUSH_SERVICE_UNINIT changeServerURL - change state to PUSH_SERVICE_ACTIVATING if serverURL present or PUSH_SERVICE_INIT if not present. changeStateConnectionEnabledEvent - it is call on pref change or during the service activation and it can change state to PUSH_SERVICE_CONNECTION_DISABLE changeStateOfflineEvent - it is called when offline state changes or during the service activation and it change state to PUSH_SERVICE_ACTIVE_OFFLINE or PUSH_SERVICE_RUNNING. uninit - change state to PUSH_SERVICE_UNINIT. 48484
PushServiceWebSocket.sys.mjs A proxy between the PushService and the WebSocket. The listener is used so that the PushService can silence messages from the WebSocket by setting PushWebSocketListener._pushService to null. This is required because a WebSocket can continue to send messages or errors after it has been closed but the PushService may not be interested in these. It's easier to stop listening than to have checks at specific points. 38250
PushSubscription.cpp 10835
PushSubscription.h 2591
PushSubscriptionOptions.cpp 2192
PushSubscriptionOptions.h 1658
test