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 #include "content/renderer/pepper/content_decryptor_delegate.h" | 5 #include "content/renderer/pepper/content_decryptor_delegate.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/safe_numerics.h" | 10 #include "base/safe_numerics.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 const PPP_ContentDecryptor_Private* plugin_decryption_interface) | 225 const PPP_ContentDecryptor_Private* plugin_decryption_interface) |
226 : pp_instance_(pp_instance), | 226 : pp_instance_(pp_instance), |
227 plugin_decryption_interface_(plugin_decryption_interface), | 227 plugin_decryption_interface_(plugin_decryption_interface), |
228 next_decryption_request_id_(1), | 228 next_decryption_request_id_(1), |
229 pending_audio_decrypt_request_id_(0), | 229 pending_audio_decrypt_request_id_(0), |
230 pending_video_decrypt_request_id_(0), | 230 pending_video_decrypt_request_id_(0), |
231 pending_audio_decoder_init_request_id_(0), | 231 pending_audio_decoder_init_request_id_(0), |
232 pending_video_decoder_init_request_id_(0), | 232 pending_video_decoder_init_request_id_(0), |
233 pending_audio_decode_request_id_(0), | 233 pending_audio_decode_request_id_(0), |
234 pending_video_decode_request_id_(0), | 234 pending_video_decode_request_id_(0), |
235 weak_ptr_factory_(this), | |
236 weak_this_(weak_ptr_factory_.GetWeakPtr()), | |
237 audio_sample_format_(media::kUnknownSampleFormat), | 235 audio_sample_format_(media::kUnknownSampleFormat), |
238 audio_samples_per_second_(0), | 236 audio_samples_per_second_(0), |
239 audio_channel_count_(0), | 237 audio_channel_count_(0), |
240 audio_bytes_per_frame_(0) { | 238 audio_bytes_per_frame_(0), |
| 239 weak_ptr_factory_(this) { |
| 240 weak_this_ = weak_ptr_factory_.GetWeakPtr(); |
241 } | 241 } |
242 | 242 |
243 ContentDecryptorDelegate::~ContentDecryptorDelegate() { | 243 ContentDecryptorDelegate::~ContentDecryptorDelegate() { |
244 } | 244 } |
245 | 245 |
246 void ContentDecryptorDelegate::Initialize(const std::string& key_system, | 246 void ContentDecryptorDelegate::Initialize(const std::string& key_system, |
247 bool can_challenge_platform) { | 247 bool can_challenge_platform) { |
248 DCHECK(!key_system.empty()); | 248 DCHECK(!key_system.empty()); |
249 DCHECK(key_system_.empty()); | 249 DCHECK(key_system_.empty()); |
250 key_system_ = key_system; | 250 key_system_ = key_system; |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 frames->push_back(frame); | 1047 frames->push_back(frame); |
1048 | 1048 |
1049 cur += frame_size; | 1049 cur += frame_size; |
1050 bytes_left -= frame_size; | 1050 bytes_left -= frame_size; |
1051 } while (bytes_left > 0); | 1051 } while (bytes_left > 0); |
1052 | 1052 |
1053 return true; | 1053 return true; |
1054 } | 1054 } |
1055 | 1055 |
1056 } // namespace content | 1056 } // namespace content |
OLD | NEW |