tor-browser

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

PMedia.ipdl (1937B)


      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 PContent;
      6 
      7 include PBackgroundSharedTypes;
      8 
      9 include "mozilla/media/MediaChild.h";
     10 
     11 namespace mozilla {
     12 namespace media {
     13 
     14 [ManualDealloc, ChildImpl="Child", ParentImpl=virtual]
     15 protocol PMedia
     16 {
     17   manager PContent;
     18 
     19 parent:
     20   /**
     21    * Requests a potentially persistent unique secret key for each principal.
     22    * Has no expiry, but is cleared by age along with cookies.
     23    * This is needed by mediaDevices.enumerateDevices() to produce persistent
     24    * deviceIds that wont work cross-origin.
     25    *
     26    * If this OriginAttributes dictionary has the privateBrowsing flag set to
     27    * false, a key for this origin is returned from a primary pool of temporal
     28    * in-memory keys and persistent keys read from disk. If no key exists, a
     29    * temporal one is created.
     30    * If aPersist is true and key is temporal, the key is promoted to persistent.
     31    * Once persistent, a key cannot become temporal again.
     32    *
     33    * If the OriginAttributes dictionary has the privateBrowsing flag set to
     34    * true, a different key for this origin is returned from a secondary pool
     35    * that is never persisted to disk, and aPersist is ignored.
     36    */
     37   async GetPrincipalKey(PrincipalInfo aPrincipal, bool aPersist) returns(nsCString aKey);
     38 
     39   /**
     40    * Clear per-orgin list of persistent deviceIds stored for enumerateDevices
     41    * Fire and forget.
     42    *
     43    * aSinceTime - milliseconds since 1 January 1970 00:00:00 UTC. 0 = clear all
     44    *
     45    * aOnlyPrivateBrowsing - if true then only purge the separate in-memory
     46    *                        per-origin list used in Private Browsing.
     47    */
     48   async SanitizeOriginKeys(uint64_t aSinceWhen, bool aOnlyPrivateBrowsing);
     49 
     50 child:
     51   async __delete__();
     52 };
     53 
     54 } // namespace media
     55 } // namespace mozilla