OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 bool DecryptAndDecodeAudio( | 94 bool DecryptAndDecodeAudio( |
95 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 95 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
96 const media::Decryptor::AudioDecodeCB& audio_decode_cb); | 96 const media::Decryptor::AudioDecodeCB& audio_decode_cb); |
97 bool DecryptAndDecodeVideo( | 97 bool DecryptAndDecodeVideo( |
98 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 98 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
99 const media::Decryptor::VideoDecodeCB& video_decode_cb); | 99 const media::Decryptor::VideoDecodeCB& video_decode_cb); |
100 | 100 |
101 // PPB_ContentDecryptor_Private dispatching methods. | 101 // PPB_ContentDecryptor_Private dispatching methods. |
102 void OnPromiseResolved(uint32 promise_id); | 102 void OnPromiseResolved(uint32 promise_id); |
103 void OnPromiseResolvedWithSession(uint32 promise_id, PP_Var web_session_id); | 103 void OnPromiseResolvedWithSession(uint32 promise_id, PP_Var web_session_id); |
104 void OnPromiseResolvedWithKeyIds(uint32 promise_id, PP_Var key_ids_array); | |
105 void OnPromiseRejected(uint32 promise_id, | 104 void OnPromiseRejected(uint32 promise_id, |
106 PP_CdmExceptionCode exception_code, | 105 PP_CdmExceptionCode exception_code, |
107 uint32 system_code, | 106 uint32 system_code, |
108 PP_Var error_description); | 107 PP_Var error_description); |
109 void OnSessionMessage(PP_Var web_session_id, | 108 void OnSessionMessage(PP_Var web_session_id, |
110 PP_Var message, | 109 PP_CdmMessageType message_type, |
111 PP_Var destination_url); | 110 PP_Var message); |
112 void OnSessionKeysChange(PP_Var web_session_id, | 111 void OnSessionKeysChange(PP_Var web_session_id, |
113 PP_Bool has_additional_usable_key); | 112 PP_Bool has_additional_usable_key, |
| 113 uint32_t key_count, |
| 114 const struct PP_KeyInformation key_information[]); |
114 void OnSessionExpirationChange(PP_Var web_session_id, | 115 void OnSessionExpirationChange(PP_Var web_session_id, |
115 PP_Time new_expiry_time); | 116 PP_Time new_expiry_time); |
116 void OnSessionReady(PP_Var web_session_id); | |
117 void OnSessionClosed(PP_Var web_session_id); | 117 void OnSessionClosed(PP_Var web_session_id); |
118 void OnSessionError(PP_Var web_session_id, | 118 void OnSessionError(PP_Var web_session_id, |
119 PP_CdmExceptionCode exception_code, | 119 PP_CdmExceptionCode exception_code, |
120 uint32 system_code, | 120 uint32 system_code, |
121 PP_Var error_description); | 121 PP_Var error_description); |
122 void DeliverBlock(PP_Resource decrypted_block, | 122 void DeliverBlock(PP_Resource decrypted_block, |
123 const PP_DecryptedBlockInfo* block_info); | 123 const PP_DecryptedBlockInfo* block_info); |
124 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type, | 124 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type, |
125 uint32_t request_id, | 125 uint32_t request_id, |
126 PP_Bool success); | 126 PP_Bool success); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 base::WeakPtr<ContentDecryptorDelegate> weak_this_; | 258 base::WeakPtr<ContentDecryptorDelegate> weak_this_; |
259 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; | 259 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; |
260 | 260 |
261 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); | 261 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); |
262 }; | 262 }; |
263 | 263 |
264 } // namespace content | 264 } // namespace content |
265 | 265 |
266 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 266 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
OLD | NEW |