Chromium Code Reviews| Index: media/mojo/interfaces/media_drm_storage.mojom |
| diff --git a/media/mojo/interfaces/media_drm_storage.mojom b/media/mojo/interfaces/media_drm_storage.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0dbf000b08a47f995ca610fb5bf2fd8af4e1d23f |
| --- /dev/null |
| +++ b/media/mojo/interfaces/media_drm_storage.mojom |
| @@ -0,0 +1,32 @@ |
| +// 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 "url/mojo/origin.mojom"; |
| + |
| +// 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| to be bound to the |origin|. This should not modify |
| + // anything in the storage. |
| + Initialize(url.mojom.Origin origin); |
| + |
| + // Saves |origin| in the storage after MediaDrm is provisioned for |origin|. |
| + OnProvisioned() => (bool success); |
| + |
| + // Saves persistent session data for |session_id|. |
| + SavePersistentSession( |
| + string session_id, array<uint8> key_set_id, string mime_type) |
|
dcheng
2017/03/29 01:17:23
One alternative is to package key_set_id and mime_
xhwang
2017/03/29 20:47:25
That's what I started with :)
But with only two v
dcheng
2017/03/29 21:15:12
Hm... why did it make it more complex? Once we hav
xhwang
2017/03/29 21:30:44
Sure, let me give it another try.
xhwang
2017/03/30 00:04:23
Done.
|
| + => (bool success); |
| + |
| + // Loads persistent session data for |session_id|. |
| + // Upon |success|, |key_set_id| and |mime_type| must not be empty. Otherwise, |
| + // |key_set_id| and |mime_type| must be empty. |
| + LoadPersistentSession(string session_id) |
| + => (bool success, array<uint8> key_set_id, string mime_type); |
|
dcheng
2017/03/29 01:17:23
Then here we can just return SessionData? here, an
xhwang
2017/03/29 20:47:25
ditto. I actually like to have |success| here to b
dcheng
2017/03/29 21:15:12
Really, the primary value is here: then we only ne
xhwang
2017/03/29 21:30:44
Acknowledged.
|
| + |
| + // Removes the persistent session data for |session_id|. |
| + RemovePersistentSession(string session_id) => (bool success); |
| +}; |