Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / localstorage / PBackgroundLSObserver.ipdl
blobc800828da311934770202e7c05675e1f6bb92199
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackground;
7 include PBackgroundSharedTypes;
9 include "mozilla/dom/localstorage/SerializationHelpers.h";
11 using mozilla::dom::LSValue
12   from "mozilla/dom/LSValue.h";
14 namespace mozilla {
15 namespace dom {
17 /**
18  * The observer protocol sends "storage" event notifications for changes to
19  * LocalStorage that take place in other processes as their Snapshots are
20  * Checkpointed to the canonical Datastore in the parent process.  Same-process
21  * notifications are generated as mutations happen.
22  *
23  * Note that mutations are never generated for redundant mutations.  Setting the
24  * key "foo" to have value "bar" when it already has value "bar" will never
25  * result in a "storage" event.
26  */
27 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
28 async protocol PBackgroundLSObserver
30   manager PBackground;
32 parent:
33   /**
34    * Sent by the LSObserver's destructor when it's going away.  Any Observe
35    * messages received after this is sent will be ignored.  Which is fine,
36    * because there should be nothing around left to hear.  In the event a new
37    * page came into existence, its Observer creation will happen (effectively)
38    * synchronously.
39    */
40   async DeleteMe();
42 child:
43   /**
44    * Only sent by the parent in response to a deletion request.
45    */
46   async __delete__();
48   /**
49    * Sent by the parent process as Snapshots from other processes are
50    * Checkpointed, applying their mutations.  The child actor currently directly
51    * shunts these to Storage::NotifyChange to generate "storage" events for
52    * immediate dispatch.
53    */
54   async Observe(PrincipalInfo principalInfo,
55                 uint32_t privateBrowsingId,
56                 nsString documentURI,
57                 nsString key,
58                 LSValue oldValue,
59                 LSValue newValue);
62 } // namespace dom
63 } // namespace mozilla