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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 private: | 88 private: |
89 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This | 89 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This |
90 // is necessary since aes_decryptor.cc does not support storing sessions. | 90 // is necessary since aes_decryptor.cc does not support storing sessions. |
91 void LoadLoadableSession(); | 91 void LoadLoadableSession(); |
92 void OnLoadSessionUpdated(); | 92 void OnLoadSessionUpdated(); |
93 | 93 |
94 // ContentDecryptionModule callbacks. | 94 // ContentDecryptionModule callbacks. |
95 void OnSessionMessage(const std::string& session_id, | 95 void OnSessionMessage(const std::string& session_id, |
96 MediaKeys::MessageType message_type, | 96 MediaKeys::MessageType message_type, |
97 const std::vector<uint8_t>& message, | 97 const std::vector<uint8_t>& message); |
98 const GURL& legacy_destination_url); | |
99 void OnSessionKeysChange(const std::string& session_id, | 98 void OnSessionKeysChange(const std::string& session_id, |
100 bool has_additional_usable_key, | 99 bool has_additional_usable_key, |
101 CdmKeysInfo keys_info); | 100 CdmKeysInfo keys_info); |
102 void OnSessionClosed(const std::string& session_id); | 101 void OnSessionClosed(const std::string& session_id); |
103 | 102 |
104 // 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 |
105 // calling |host_| to resolve or reject the promise. | 104 // calling |host_| to resolve or reject the promise. |
106 void OnSessionCreated(uint32_t promise_id, const std::string& session_id); | 105 void OnSessionCreated(uint32_t promise_id, const std::string& session_id); |
107 void OnSessionLoaded(uint32_t promise_id, const std::string& session_id); | 106 void OnSessionLoaded(uint32_t promise_id, const std::string& session_id); |
108 void OnPromiseResolved(uint32_t promise_id); | 107 void OnPromiseResolved(uint32_t promise_id); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 std::unique_ptr<FileIOTestRunner> file_io_test_runner_; | 213 std::unique_ptr<FileIOTestRunner> file_io_test_runner_; |
215 | 214 |
216 bool is_running_output_protection_test_; | 215 bool is_running_output_protection_test_; |
217 | 216 |
218 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 217 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
219 }; | 218 }; |
220 | 219 |
221 } // namespace media | 220 } // namespace media |
222 | 221 |
223 #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 |