Name Description Size
components.conf 860
moz.build 1379
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. 9636
PushBroadcastService.sys.mjs Convert the listeners from our on-disk format to the format needed by a hello message. 8788
PushComponents.sys.mjs This file exports XPCOM components for C++ and chrome JavaScript callers to interact with the Push service. 15394
PushCrypto.sys.mjs Localized error property names. 26650
PushDB.sys.mjs @param aRecord The record to be added. 13068
PushManager.cpp 16524
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. 3746
PushNotifier.cpp 14819
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. 9374
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. 47449
PushServiceHttp2.sys.mjs A proxy between the PushService and connections listening for incoming push messages. The PushService can silence messages from the connections by setting PushSubscriptionListener._pushService to null. This is required because it can happen that there is an outstanding push message that will be send on OnStopRequest but the PushService may not be interested in these. It's easier to stop listening than to have checks at specific points. 23202
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. 37655
PushSubscription.cpp 11079
PushSubscription.h 2591
PushSubscriptionOptions.cpp 2311
PushSubscriptionOptions.h 1677
PushUtil.cpp static 1168
PushUtil.h 1083
test