| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module mojo; | 5 module mojo; |
| 6 | 6 |
| 7 import "media/mojo/interfaces/decryptor.mojom"; | 7 import "media/mojo/interfaces/decryptor.mojom"; |
| 8 | 8 |
| 9 // Transport layer of media::MediaKeys::Exception (see media/base/media_keys.h). | 9 // Transport layer of media::MediaKeys::Exception (see media/base/media_keys.h). |
| 10 // This is used for ContentDecryptionModule (CDM) promise rejections. | 10 // This is used for ContentDecryptionModule (CDM) promise rejections. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // An interface that represents a CDM in the Encrypted Media Extensions (EME) | 60 // An interface that represents a CDM in the Encrypted Media Extensions (EME) |
| 61 // spec (https://w3c.github.io/encrypted-media/). See media/base/media_keys.h. | 61 // spec (https://w3c.github.io/encrypted-media/). See media/base/media_keys.h. |
| 62 interface ContentDecryptionModule { | 62 interface ContentDecryptionModule { |
| 63 // See media::MediaKeys::SessionType. | 63 // See media::MediaKeys::SessionType. |
| 64 enum SessionType { | 64 enum SessionType { |
| 65 TEMPORARY_SESSION, | 65 TEMPORARY_SESSION, |
| 66 PERSISTENT_LICENSE_SESSION, | 66 PERSISTENT_LICENSE_SESSION, |
| 67 PERSISTENT_RELEASE_MESSAGE_SESSION | 67 PERSISTENT_RELEASE_MESSAGE_SESSION |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // Sets ContentDecryptionModuleClient. Must be called before any other calls. |
| 71 SetClient(ContentDecryptionModuleClient client); |
| 72 |
| 70 // Provides a server certificate to be used to encrypt messages to the | 73 // Provides a server certificate to be used to encrypt messages to the |
| 71 // license server. | 74 // license server. |
| 72 SetServerCertificate(array<uint8> certificate_data) | 75 SetServerCertificate(array<uint8> certificate_data) |
| 73 => (CdmPromiseResult result); | 76 => (CdmPromiseResult result); |
| 74 | 77 |
| 75 // Creates a session with the |init_data_type|, |init_data| and |session_type| | 78 // Creates a session with the |init_data_type|, |init_data| and |session_type| |
| 76 // provided. If |result.success| is false, the output |session_id| will be | 79 // provided. If |result.success| is false, the output |session_id| will be |
| 77 // null. | 80 // null. |
| 78 CreateSessionAndGenerateRequest(SessionType session_type, | 81 CreateSessionAndGenerateRequest(SessionType session_type, |
| 79 string init_data_type, | 82 string init_data_type, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 OnSessionClosed(string session_id); | 125 OnSessionClosed(string session_id); |
| 123 | 126 |
| 124 OnSessionError(string session_id, CdmException exception, | 127 OnSessionError(string session_id, CdmException exception, |
| 125 uint32 system_code, string error_message); | 128 uint32 system_code, string error_message); |
| 126 | 129 |
| 127 OnSessionKeysChange(string session_id, bool has_additional_usable_key, | 130 OnSessionKeysChange(string session_id, bool has_additional_usable_key, |
| 128 array<CdmKeyInformation> key_information); | 131 array<CdmKeyInformation> key_information); |
| 129 | 132 |
| 130 OnSessionExpirationUpdate(string session_id, int64 new_expiry_time_usec); | 133 OnSessionExpirationUpdate(string session_id, int64 new_expiry_time_usec); |
| 131 }; | 134 }; |
| OLD | NEW |