mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
module media.mojom;
|
|
|
|
import "mojo/common/unguessable_token.mojom";
|
|
|
|
struct SessionData {
|
|
array<uint8> key_set_id;
|
|
string mime_type;
|
|
};
|
|
|
|
// Allows MediaDrmBridge to store and retrieve persistent data. This is needed
|
|
// for features like per-origin provisioning and persistent license support.
|
|
interface MediaDrmStorage {
|
|
// Initializes |this| and return a random orign ID which can identify the
|
|
// current origin. The origin ID should be randomly generated if it doesn't
|
|
// exist. |origin_id| must be valid.
|
|
// This should not modify anything in the storage.
|
|
Initialize() => (mojo.common.mojom.UnguessableToken origin_id);
|
|
|
|
// Saves origin information (e.g. origin ID, provision time) in the storage
|
|
// after MediaDrm is provisioned for current origin.
|
|
OnProvisioned() => (bool success);
|
|
|
|
// Saves persistent session data for |session_id|.
|
|
SavePersistentSession(
|
|
string session_id, SessionData session_data) => (bool success);
|
|
|
|
// Loads persistent session data for |session_id|.
|
|
// Upon failure, null |session_data| will be returned.
|
|
LoadPersistentSession(string session_id) => (SessionData? session_data);
|
|
|
|
// Removes the persistent session data for |session_id|.
|
|
RemovePersistentSession(string session_id) => (bool success);
|
|
};
|