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";
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.
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.
27 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
28 async protocol PBackgroundLSObserver
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)
44 * Only sent by the parent in response to a deletion request.
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
54 async Observe(PrincipalInfo principalInfo,
55 uint32_t privateBrowsingId,
63 } // namespace mozilla