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> |
| 11 #include <vector> |
11 | 12 |
12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
13 #include "base/callback_helpers.h" | 14 #include "base/callback_helpers.h" |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
17 #include "media/base/cdm_promise.h" | 18 #include "media/base/cdm_promise.h" |
18 #include "media/base/cdm_promise_adapter.h" | 19 #include "media/base/cdm_promise_adapter.h" |
19 #include "media/base/channel_layout.h" | 20 #include "media/base/channel_layout.h" |
20 #include "media/base/decryptor.h" | 21 #include "media/base/decryptor.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const media::SessionMessageCB& session_message_cb, | 54 const media::SessionMessageCB& session_message_cb, |
54 const media::SessionClosedCB& session_closed_cb, | 55 const media::SessionClosedCB& session_closed_cb, |
55 const media::LegacySessionErrorCB& legacy_session_error_cb, | 56 const media::LegacySessionErrorCB& legacy_session_error_cb, |
56 const media::SessionKeysChangeCB& session_keys_change_cb, | 57 const media::SessionKeysChangeCB& session_keys_change_cb, |
57 const media::SessionExpirationUpdateCB& session_expiration_update_cb, | 58 const media::SessionExpirationUpdateCB& session_expiration_update_cb, |
58 const base::Closure& fatal_plugin_error_cb); | 59 const base::Closure& fatal_plugin_error_cb); |
59 | 60 |
60 void InstanceCrashed(); | 61 void InstanceCrashed(); |
61 | 62 |
62 // Provides access to PPP_ContentDecryptor_Private. | 63 // Provides access to PPP_ContentDecryptor_Private. |
63 void SetServerCertificate(const uint8_t* certificate, | 64 void SetServerCertificate(const std::vector<uint8>& certificate, |
64 uint32_t certificate_length, | |
65 scoped_ptr<media::SimpleCdmPromise> promise); | 65 scoped_ptr<media::SimpleCdmPromise> promise); |
66 void CreateSessionAndGenerateRequest( | 66 void CreateSessionAndGenerateRequest( |
67 media::MediaKeys::SessionType session_type, | 67 media::MediaKeys::SessionType session_type, |
68 media::EmeInitDataType init_data_type, | 68 media::EmeInitDataType init_data_type, |
69 const uint8* init_data, | 69 const std::vector<uint8>& init_data, |
70 int init_data_length, | |
71 scoped_ptr<media::NewSessionCdmPromise> promise); | 70 scoped_ptr<media::NewSessionCdmPromise> promise); |
72 void LoadSession(media::MediaKeys::SessionType session_type, | 71 void LoadSession(media::MediaKeys::SessionType session_type, |
73 const std::string& session_id, | 72 const std::string& session_id, |
74 scoped_ptr<media::NewSessionCdmPromise> promise); | 73 scoped_ptr<media::NewSessionCdmPromise> promise); |
75 void UpdateSession(const std::string& session_id, | 74 void UpdateSession(const std::string& session_id, |
76 const uint8* response, | 75 const std::vector<uint8>& response, |
77 int response_length, | |
78 scoped_ptr<media::SimpleCdmPromise> promise); | 76 scoped_ptr<media::SimpleCdmPromise> promise); |
79 void CloseSession(const std::string& session_id, | 77 void CloseSession(const std::string& session_id, |
80 scoped_ptr<media::SimpleCdmPromise> promise); | 78 scoped_ptr<media::SimpleCdmPromise> promise); |
81 void RemoveSession(const std::string& session_id, | 79 void RemoveSession(const std::string& session_id, |
82 scoped_ptr<media::SimpleCdmPromise> promise); | 80 scoped_ptr<media::SimpleCdmPromise> promise); |
83 bool Decrypt(media::Decryptor::StreamType stream_type, | 81 bool Decrypt(media::Decryptor::StreamType stream_type, |
84 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 82 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
85 const media::Decryptor::DecryptCB& decrypt_cb); | 83 const media::Decryptor::DecryptCB& decrypt_cb); |
86 bool CancelDecrypt(media::Decryptor::StreamType stream_type); | 84 bool CancelDecrypt(media::Decryptor::StreamType stream_type); |
87 bool InitializeAudioDecoder( | 85 bool InitializeAudioDecoder( |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 245 |
248 base::WeakPtr<ContentDecryptorDelegate> weak_this_; | 246 base::WeakPtr<ContentDecryptorDelegate> weak_this_; |
249 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; | 247 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; |
250 | 248 |
251 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); | 249 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); |
252 }; | 250 }; |
253 | 251 |
254 } // namespace content | 252 } // namespace content |
255 | 253 |
256 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 254 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
OLD | NEW |