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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 uint32_t link_mask, uint32_t output_protection_mask) override; | 84 uint32_t link_mask, uint32_t output_protection_mask) override; |
85 | 85 |
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 MediaKeys::MessageType message_type, | 93 MediaKeys::MessageType message_type, |
94 const std::vector<uint8>& message); | 94 const std::vector<uint8>& message, |
| 95 const GURL& legacy_destination_url); |
95 void OnSessionKeysChange(const std::string& web_session_id, | 96 void OnSessionKeysChange(const std::string& web_session_id, |
96 bool has_additional_usable_key, | 97 bool has_additional_usable_key, |
97 CdmKeysInfo keys_info); | 98 CdmKeysInfo keys_info); |
98 void OnSessionClosed(const std::string& web_session_id); | 99 void OnSessionClosed(const std::string& web_session_id); |
99 | 100 |
100 // Handle the success/failure of a promise. These methods are responsible for | 101 // Handle the success/failure of a promise. These methods are responsible for |
101 // calling |host_| to resolve or reject the promise. | 102 // calling |host_| to resolve or reject the promise. |
102 void OnSessionCreated(uint32 promise_id, const std::string& web_session_id); | 103 void OnSessionCreated(uint32 promise_id, const std::string& web_session_id); |
103 void OnSessionLoaded(uint32 promise_id, const std::string& web_session_id); | 104 void OnSessionLoaded(uint32 promise_id, const std::string& web_session_id); |
104 void OnSessionUpdated(uint32 promise_id, const std::string& web_session_id); | 105 void OnSessionUpdated(uint32 promise_id, const std::string& web_session_id); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 scoped_ptr<CdmVideoDecoder> video_decoder_; | 192 scoped_ptr<CdmVideoDecoder> video_decoder_; |
192 | 193 |
193 scoped_ptr<FileIOTestRunner> file_io_test_runner_; | 194 scoped_ptr<FileIOTestRunner> file_io_test_runner_; |
194 | 195 |
195 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 196 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
196 }; | 197 }; |
197 | 198 |
198 } // namespace media | 199 } // namespace media |
199 | 200 |
200 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 201 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
OLD | NEW |