tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PBackgroundLSObserver.ipdl (2039B)


      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/. */
      4 
      5 include protocol PBackground;
      6 
      7 include PBackgroundSharedTypes;
      8 
      9 include "mozilla/dom/localstorage/SerializationHelpers.h";
     10 
     11 using mozilla::dom::LSValue
     12   from "mozilla/dom/LSValue.h";
     13 
     14 namespace mozilla {
     15 namespace dom {
     16 
     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
     29 {
     30   manager PBackground;
     31 
     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();
     41 
     42 child:
     43   /**
     44    * Only sent by the parent in response to a deletion request.
     45    */
     46   async __delete__();
     47 
     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);
     60 };
     61 
     62 } // namespace dom
     63 } // namespace mozilla