2015-03-03 14:51:05 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
include protocol PContent;
|
|
|
|
|
2017-01-28 17:29:13 +00:00
|
|
|
include PBackgroundSharedTypes;
|
|
|
|
|
2015-03-03 14:51:05 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace media {
|
|
|
|
|
2015-03-29 17:43:43 +00:00
|
|
|
protocol PMedia
|
2015-03-03 14:51:05 +00:00
|
|
|
{
|
2015-06-18 15:46:36 +00:00
|
|
|
manager PContent;
|
2015-03-03 14:51:05 +00:00
|
|
|
|
|
|
|
parent:
|
|
|
|
/**
|
2017-01-28 17:29:13 +00:00
|
|
|
* Requests a potentially persistent unique secret key for each principal.
|
2015-03-03 14:51:05 +00:00
|
|
|
* Has no expiry, but is cleared by age along with cookies.
|
|
|
|
* This is needed by mediaDevices.enumerateDevices() to produce persistent
|
|
|
|
* deviceIds that wont work cross-origin.
|
2015-07-13 04:09:02 +00:00
|
|
|
*
|
2016-12-07 17:07:09 +00:00
|
|
|
* If this OriginAttributes dictionary has the privateBrowsing flag set to
|
|
|
|
* false, a key for this origin is returned from a primary pool of temporal
|
|
|
|
* in-memory keys and persistent keys read from disk. If no key exists, a
|
|
|
|
* temporal one is created.
|
2015-07-13 04:09:02 +00:00
|
|
|
* If aPersist is true and key is temporal, the key is promoted to persistent.
|
|
|
|
* Once persistent, a key cannot become temporal again.
|
|
|
|
*
|
2016-12-07 17:07:09 +00:00
|
|
|
* If the OriginAttributes dictionary has the privateBrowsing flag set to
|
|
|
|
* true, a different key for this origin is returned from a secondary pool
|
|
|
|
* that is never persisted to disk, and aPersist is ignored.
|
2015-03-03 14:51:05 +00:00
|
|
|
*/
|
2018-09-25 17:03:22 +00:00
|
|
|
async GetPrincipalKey(PrincipalInfo aPrincipal, bool aPersist) returns(nsCString aKey);
|
2015-03-03 14:51:05 +00:00
|
|
|
|
|
|
|
/**
|
2015-07-13 03:55:02 +00:00
|
|
|
* Clear per-orgin list of persistent deviceIds stored for enumerateDevices
|
|
|
|
* Fire and forget.
|
|
|
|
*
|
|
|
|
* aSinceTime - milliseconds since 1 January 1970 00:00:00 UTC. 0 = clear all
|
|
|
|
*
|
|
|
|
* aOnlyPrivateBrowsing - if true then only purge the separate in-memory
|
|
|
|
* per-origin list used in Private Browsing.
|
2015-03-03 14:51:05 +00:00
|
|
|
*/
|
2016-01-26 21:51:53 +00:00
|
|
|
async SanitizeOriginKeys(uint64_t aSinceWhen, bool aOnlyPrivateBrowsing);
|
2015-03-03 14:51:05 +00:00
|
|
|
|
2015-03-29 17:43:43 +00:00
|
|
|
child:
|
2016-01-26 21:51:53 +00:00
|
|
|
async __delete__();
|
2015-03-03 14:51:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace media
|
|
|
|
} // namespace mozilla
|