| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 bool has_additional_usable_key, | 99 bool has_additional_usable_key, |
| 100 CdmKeysInfo keys_info); | 100 CdmKeysInfo keys_info); |
| 101 void OnSessionClosed(const std::string& session_id); | 101 void OnSessionClosed(const std::string& session_id); |
| 102 | 102 |
| 103 // Handle the success/failure of a promise. These methods are responsible for | 103 // Handle the success/failure of a promise. These methods are responsible for |
| 104 // calling |host_| to resolve or reject the promise. | 104 // calling |host_| to resolve or reject the promise. |
| 105 void OnSessionCreated(uint32_t promise_id, const std::string& session_id); | 105 void OnSessionCreated(uint32_t promise_id, const std::string& session_id); |
| 106 void OnSessionLoaded(uint32_t promise_id, const std::string& session_id); | 106 void OnSessionLoaded(uint32_t promise_id, const std::string& session_id); |
| 107 void OnPromiseResolved(uint32_t promise_id); | 107 void OnPromiseResolved(uint32_t promise_id); |
| 108 void OnPromiseFailed(uint32_t promise_id, | 108 void OnPromiseFailed(uint32_t promise_id, |
| 109 MediaKeys::Exception exception_code, | 109 CdmPromise::Exception exception_code, |
| 110 uint32_t system_code, | 110 uint32_t system_code, |
| 111 const std::string& error_message); | 111 const std::string& error_message); |
| 112 | 112 |
| 113 // Prepares next renewal message and sets a timer for it. | 113 // Prepares next renewal message and sets a timer for it. |
| 114 void ScheduleNextRenewal(); | 114 void ScheduleNextRenewal(); |
| 115 | 115 |
| 116 // Decrypts the |encrypted_buffer| and puts the result in |decrypted_buffer|. | 116 // Decrypts the |encrypted_buffer| and puts the result in |decrypted_buffer|. |
| 117 // Returns cdm::kSuccess if decryption succeeded. The decrypted result is | 117 // Returns cdm::kSuccess if decryption succeeded. The decrypted result is |
| 118 // put in |decrypted_buffer|. If |encrypted_buffer| is empty, the | 118 // put in |decrypted_buffer|. If |encrypted_buffer| is empty, the |
| 119 // |decrypted_buffer| is set to an empty (EOS) buffer. | 119 // |decrypted_buffer| is set to an empty (EOS) buffer. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 std::unique_ptr<FileIOTestRunner> file_io_test_runner_; | 213 std::unique_ptr<FileIOTestRunner> file_io_test_runner_; |
| 214 | 214 |
| 215 bool is_running_output_protection_test_; | 215 bool is_running_output_protection_test_; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 217 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace media | 220 } // namespace media |
| 221 | 221 |
| 222 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 222 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| OLD | NEW |