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 #include "webkit/renderer/media/crypto/ppapi_decryptor.h" | 5 #include "webkit/renderer/media/crypto/ppapi_decryptor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 const media::NeedKeyCB& need_key_cb) | 31 const media::NeedKeyCB& need_key_cb) |
32 : plugin_instance_(plugin_instance), | 32 : plugin_instance_(plugin_instance), |
33 key_added_cb_(key_added_cb), | 33 key_added_cb_(key_added_cb), |
34 key_error_cb_(key_error_cb), | 34 key_error_cb_(key_error_cb), |
35 key_message_cb_(key_message_cb), | 35 key_message_cb_(key_message_cb), |
36 need_key_cb_(need_key_cb), | 36 need_key_cb_(need_key_cb), |
37 plugin_cdm_delegate_(NULL), | 37 plugin_cdm_delegate_(NULL), |
38 render_loop_proxy_(base::MessageLoopProxy::current()), | 38 render_loop_proxy_(base::MessageLoopProxy::current()), |
39 weak_ptr_factory_(this), | 39 weak_ptr_factory_(this), |
40 weak_this_(weak_ptr_factory_.GetWeakPtr()) { | 40 weak_this_(weak_ptr_factory_.GetWeakPtr()) { |
41 DCHECK(plugin_instance_); | 41 DCHECK(plugin_instance_.get()); |
42 } | 42 } |
43 | 43 |
44 PpapiDecryptor::~PpapiDecryptor() { | 44 PpapiDecryptor::~PpapiDecryptor() { |
45 plugin_cdm_delegate_ = NULL; | 45 plugin_cdm_delegate_ = NULL; |
46 plugin_instance_ = NULL; | 46 plugin_instance_ = NULL; |
47 } | 47 } |
48 | 48 |
49 bool PpapiDecryptor::GenerateKeyRequest(const std::string& key_system, | 49 bool PpapiDecryptor::GenerateKeyRequest(const std::string& key_system, |
50 const std::string& type, | 50 const std::string& type, |
51 const uint8* init_data, | 51 const uint8* init_data, |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 const std::string& session_id, | 286 const std::string& session_id, |
287 const std::string& type, | 287 const std::string& type, |
288 scoped_ptr<uint8[]> init_data, | 288 scoped_ptr<uint8[]> init_data, |
289 int init_data_size) { | 289 int init_data_size) { |
290 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 290 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
291 need_key_cb_.Run(key_system, session_id, type, | 291 need_key_cb_.Run(key_system, session_id, type, |
292 init_data.Pass(), init_data_size); | 292 init_data.Pass(), init_data_size); |
293 } | 293 } |
294 | 294 |
295 } // namespace webkit_media | 295 } // namespace webkit_media |
OLD | NEW |