Chromium Code Reviews| 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 // Allows MediaDrmBridge to store and retrieve persistent data. This is needed | |
| 10 // for features like per-origin provisioning and persistent license support. | |
| 11 interface MediaDrmStorage { | |
| 12 // Initializes |this| to be bound to the |origin|. This should not modify | |
| 13 // anything in the storage. | |
| 14 Initialize(url.mojom.Origin origin); | |
| 15 | |
| 16 // Saves |origin| in the storage after MediaDrm is provisioned for |origin|. | |
| 17 OnProvisioned() => (bool success); | |
| 18 | |
| 19 // Saves persistent session data for |session_id|. | |
| 20 SavePersistentSession( | |
| 21 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.
| |
| 22 => (bool success); | |
| 23 | |
| 24 // Loads persistent session data for |session_id|. | |
| 25 // Upon |success|, |key_set_id| and |mime_type| must not be empty. Otherwise, | |
| 26 // |key_set_id| and |mime_type| must be empty. | |
| 27 LoadPersistentSession(string session_id) | |
| 28 => (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.
| |
| 29 | |
| 30 // Removes the persistent session data for |session_id|. | |
| 31 RemovePersistentSession(string session_id) => (bool success); | |
| 32 }; | |
| OLD | NEW |