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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 private: | 86 private: |
87 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This | 87 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This |
88 // is necessary since aes_decryptor.cc does not support storing sessions. | 88 // is necessary since aes_decryptor.cc does not support storing sessions. |
89 void LoadLoadableSession(); | 89 void LoadLoadableSession(); |
90 | 90 |
91 // ContentDecryptionModule callbacks. | 91 // ContentDecryptionModule callbacks. |
92 void OnSessionMessage(const std::string& web_session_id, | 92 void OnSessionMessage(const std::string& web_session_id, |
93 const std::vector<uint8>& message, | 93 const std::vector<uint8>& message, |
94 const GURL& destination_url); | 94 const GURL& destination_url); |
95 void OnSessionKeysChange(const std::string& web_session_id, | 95 void OnSessionKeysChange(const std::string& web_session_id, |
96 bool has_additional_usable_key); | 96 bool has_additional_usable_key, |
| 97 const CdmKeysInfo& keys_info); |
97 void OnSessionClosed(const std::string& web_session_id); | 98 void OnSessionClosed(const std::string& web_session_id); |
98 | 99 |
99 // Handle the success/failure of a promise. These methods are responsible for | 100 // Handle the success/failure of a promise. These methods are responsible for |
100 // calling |host_| to resolve or reject the promise. | 101 // calling |host_| to resolve or reject the promise. |
101 void OnSessionCreated(uint32 promise_id, const std::string& web_session_id); | 102 void OnSessionCreated(uint32 promise_id, const std::string& web_session_id); |
102 void OnSessionLoaded(uint32 promise_id, const std::string& web_session_id); | 103 void OnSessionLoaded(uint32 promise_id, const std::string& web_session_id); |
103 void OnSessionUpdated(uint32 promise_id, const std::string& web_session_id); | 104 void OnSessionUpdated(uint32 promise_id, const std::string& web_session_id); |
104 void OnPromiseResolved(uint32 promise_id); | 105 void OnPromiseResolved(uint32 promise_id); |
105 void OnPromiseFailed(uint32 promise_id, | 106 void OnPromiseFailed(uint32 promise_id, |
106 MediaKeys::Exception exception_code, | 107 MediaKeys::Exception exception_code, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 scoped_ptr<CdmVideoDecoder> video_decoder_; | 191 scoped_ptr<CdmVideoDecoder> video_decoder_; |
191 | 192 |
192 scoped_ptr<FileIOTestRunner> file_io_test_runner_; | 193 scoped_ptr<FileIOTestRunner> file_io_test_runner_; |
193 | 194 |
194 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 195 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
195 }; | 196 }; |
196 | 197 |
197 } // namespace media | 198 } // namespace media |
198 | 199 |
199 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 200 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
OLD | NEW |