OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module media.mojom; |
| 6 |
| 7 import "url/mojo/origin.mojom"; |
| 8 |
| 9 struct SessionData { |
| 10 array<uint8> key_set_id; |
| 11 string mime_type; |
| 12 }; |
| 13 |
| 14 // Allows MediaDrmBridge to store and retrieve persistent data. This is needed |
| 15 // for features like per-origin provisioning and persistent license support. |
| 16 interface MediaDrmStorage { |
| 17 // Initializes |this| to be bound to the |origin|. This should not modify |
| 18 // anything in the storage. |
| 19 Initialize(url.mojom.Origin origin); |
| 20 |
| 21 // Saves |origin| in the storage after MediaDrm is provisioned for |origin|. |
| 22 OnProvisioned() => (bool success); |
| 23 |
| 24 // Saves persistent session data for |session_id|. |
| 25 SavePersistentSession( |
| 26 string session_id, SessionData session_data) => (bool success); |
| 27 |
| 28 // Loads persistent session data for |session_id|. |
| 29 // Upon failure, null |session_data| will be returned. |
| 30 LoadPersistentSession(string session_id) => (SessionData? session_data); |
| 31 |
| 32 // Removes the persistent session data for |session_id|. |
| 33 RemovePersistentSession(string session_id) => (bool success); |
| 34 }; |
OLD | NEW |