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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void Initialize( | 53 void Initialize( |
54 const std::string& key_system, | 54 const std::string& key_system, |
55 bool allow_distinctive_identifier, | 55 bool allow_distinctive_identifier, |
56 bool allow_persistent_state, | 56 bool allow_persistent_state, |
57 const media::SessionMessageCB& session_message_cb, | 57 const media::SessionMessageCB& session_message_cb, |
58 const media::SessionClosedCB& session_closed_cb, | 58 const media::SessionClosedCB& session_closed_cb, |
59 const media::LegacySessionErrorCB& legacy_session_error_cb, | 59 const media::LegacySessionErrorCB& legacy_session_error_cb, |
60 const media::SessionKeysChangeCB& session_keys_change_cb, | 60 const media::SessionKeysChangeCB& session_keys_change_cb, |
61 const media::SessionExpirationUpdateCB& session_expiration_update_cb, | 61 const media::SessionExpirationUpdateCB& session_expiration_update_cb, |
62 const base::Closure& fatal_plugin_error_cb, | 62 const base::Closure& fatal_plugin_error_cb, |
63 scoped_ptr<media::SimpleCdmPromise> promise); | 63 std::unique_ptr<media::SimpleCdmPromise> promise); |
64 | 64 |
65 void InstanceCrashed(); | 65 void InstanceCrashed(); |
66 | 66 |
67 // Provides access to PPP_ContentDecryptor_Private. | 67 // Provides access to PPP_ContentDecryptor_Private. |
68 void SetServerCertificate(const std::vector<uint8_t>& certificate, | 68 void SetServerCertificate(const std::vector<uint8_t>& certificate, |
69 scoped_ptr<media::SimpleCdmPromise> promise); | 69 std::unique_ptr<media::SimpleCdmPromise> promise); |
70 void CreateSessionAndGenerateRequest( | 70 void CreateSessionAndGenerateRequest( |
71 media::MediaKeys::SessionType session_type, | 71 media::MediaKeys::SessionType session_type, |
72 media::EmeInitDataType init_data_type, | 72 media::EmeInitDataType init_data_type, |
73 const std::vector<uint8_t>& init_data, | 73 const std::vector<uint8_t>& init_data, |
74 scoped_ptr<media::NewSessionCdmPromise> promise); | 74 std::unique_ptr<media::NewSessionCdmPromise> promise); |
75 void LoadSession(media::MediaKeys::SessionType session_type, | 75 void LoadSession(media::MediaKeys::SessionType session_type, |
76 const std::string& session_id, | 76 const std::string& session_id, |
77 scoped_ptr<media::NewSessionCdmPromise> promise); | 77 std::unique_ptr<media::NewSessionCdmPromise> promise); |
78 void UpdateSession(const std::string& session_id, | 78 void UpdateSession(const std::string& session_id, |
79 const std::vector<uint8_t>& response, | 79 const std::vector<uint8_t>& response, |
80 scoped_ptr<media::SimpleCdmPromise> promise); | 80 std::unique_ptr<media::SimpleCdmPromise> promise); |
81 void CloseSession(const std::string& session_id, | 81 void CloseSession(const std::string& session_id, |
82 scoped_ptr<media::SimpleCdmPromise> promise); | 82 std::unique_ptr<media::SimpleCdmPromise> promise); |
83 void RemoveSession(const std::string& session_id, | 83 void RemoveSession(const std::string& session_id, |
84 scoped_ptr<media::SimpleCdmPromise> promise); | 84 std::unique_ptr<media::SimpleCdmPromise> promise); |
85 bool Decrypt(media::Decryptor::StreamType stream_type, | 85 bool Decrypt(media::Decryptor::StreamType stream_type, |
86 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 86 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
87 const media::Decryptor::DecryptCB& decrypt_cb); | 87 const media::Decryptor::DecryptCB& decrypt_cb); |
88 bool CancelDecrypt(media::Decryptor::StreamType stream_type); | 88 bool CancelDecrypt(media::Decryptor::StreamType stream_type); |
89 bool InitializeAudioDecoder( | 89 bool InitializeAudioDecoder( |
90 const media::AudioDecoderConfig& decoder_config, | 90 const media::AudioDecoderConfig& decoder_config, |
91 const media::Decryptor::DecoderInitCB& decoder_init_cb); | 91 const media::Decryptor::DecoderInitCB& decoder_init_cb); |
92 bool InitializeVideoDecoder( | 92 bool InitializeVideoDecoder( |
93 const media::VideoDecoderConfig& decoder_config, | 93 const media::VideoDecoderConfig& decoder_config, |
94 const media::Decryptor::DecoderInitCB& decoder_init_cb); | 94 const media::Decryptor::DecoderInitCB& decoder_init_cb); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 base::WeakPtr<ContentDecryptorDelegate> weak_this_; | 250 base::WeakPtr<ContentDecryptorDelegate> weak_this_; |
251 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; | 251 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; |
252 | 252 |
253 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); | 253 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); |
254 }; | 254 }; |
255 | 255 |
256 } // namespace content | 256 } // namespace content |
257 | 257 |
258 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 258 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
OLD | NEW |