gecko-dev/dom/interfaces/push
Kit Cambridge 21fdc3d97d Bug 1275434 - Refactor `PushNotifier` to clarify remoting logic. r=dragana
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
2016-05-19 19:01:34 -07:00
..
moz.build Bug 1246341 - Report push event errors and rejections to the Push service. r=baku 2016-03-28 11:50:39 -07:00
nsIPushErrorReporter.idl Bug 1266433 - Update the comments in the Push XPIDL interfaces. r=me 2016-04-26 10:20:08 -07:00
nsIPushNotifier.idl Bug 1275434 - Refactor `PushNotifier` to clarify remoting logic. r=dragana 2016-05-19 19:01:34 -07:00
nsIPushService.idl Bug 1269436 - Always pass the principal to push observer notifications. r=dragana 2016-05-02 09:38:47 -07:00