mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
21fdc3d97d
Previously, all `PushNotifier` methods checked the process type, and either called `Notify*{Workers, Observers}` or sent an IPDL message. The message handlers then called back in to `PushNotifier` from the remote process. This was clearer when we only sent worker event notifications to the content process, and fired all observer notifications in the parent. It became more complicated once we started notifying observers for all subscriptions in both processes (bug 1266433). This makes it harder to see omissions; for example, "push-subscription-modified" isn't currently forwarded to the child, but "push-subscription-change" and "push-message" are. This patch moves the remoting code into `PushNotifier::Dispatch`, and adds a base `PushDispatcher` class. Each notification type subclasses this class and implements logic for sending messages and firing observers and worker events. It's more code, but a bit easier to see which methods are called where. MozReview-Commit-ID: 7Q0eD7qXOrW --HG-- extra : rebase_source : c69acb95a0cb5470cf1c804639971be41b976cc2 |
||
---|---|---|
.. | ||
apps | ||
base | ||
canvas | ||
core | ||
css | ||
events | ||
gamepad | ||
geolocation | ||
html | ||
json | ||
notification | ||
offline | ||
permission | ||
push | ||
range | ||
security | ||
settings | ||
sidebar | ||
smil | ||
storage | ||
stylesheets | ||
svg | ||
traversal | ||
xbl | ||
xpath | ||
xul |