Chromium Code Reviews| 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 "content/renderer/media/crypto/ppapi_decryptor.h" | 5 #include "content/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 18 matching lines...) Expand all Loading... | |
| 29 const media::KeyErrorCB& key_error_cb, | 29 const media::KeyErrorCB& key_error_cb, |
| 30 const media::KeyMessageCB& key_message_cb, | 30 const media::KeyMessageCB& key_message_cb, |
| 31 const base::Closure& destroy_plugin_cb) { | 31 const base::Closure& destroy_plugin_cb) { |
| 32 ContentDecryptorDelegate* plugin_cdm_delegate = | 32 ContentDecryptorDelegate* plugin_cdm_delegate = |
| 33 plugin_instance->GetContentDecryptorDelegate(); | 33 plugin_instance->GetContentDecryptorDelegate(); |
| 34 if (!plugin_cdm_delegate) { | 34 if (!plugin_cdm_delegate) { |
| 35 DVLOG(1) << "PpapiDecryptor: plugin cdm delegate creation failed."; | 35 DVLOG(1) << "PpapiDecryptor: plugin cdm delegate creation failed."; |
| 36 return scoped_ptr<PpapiDecryptor>(); | 36 return scoped_ptr<PpapiDecryptor>(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 plugin_cdm_delegate->Initialize(key_system); | 39 // TODO(jrummell): How do we get the can_challenge_platform value from |
| 40 // the browser? | |
| 41 bool can_challenge_platform = false; | |
|
DaleCurtis
2013/09/19 01:12:36
const
jrummell
2013/09/19 18:15:15
Done.
| |
| 42 plugin_cdm_delegate->Initialize(key_system, can_challenge_platform); | |
| 40 | 43 |
| 41 return scoped_ptr<PpapiDecryptor>(new PpapiDecryptor(plugin_instance, | 44 return scoped_ptr<PpapiDecryptor>(new PpapiDecryptor(plugin_instance, |
| 42 plugin_cdm_delegate, | 45 plugin_cdm_delegate, |
| 43 key_added_cb, | 46 key_added_cb, |
| 44 key_error_cb, | 47 key_error_cb, |
| 45 key_message_cb, | 48 key_message_cb, |
| 46 destroy_plugin_cb)); | 49 destroy_plugin_cb)); |
| 47 } | 50 } |
| 48 | 51 |
| 49 PpapiDecryptor::PpapiDecryptor( | 52 PpapiDecryptor::PpapiDecryptor( |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 } | 301 } |
| 299 | 302 |
| 300 void PpapiDecryptor::KeyMessage(const std::string& session_id, | 303 void PpapiDecryptor::KeyMessage(const std::string& session_id, |
| 301 const std::vector<uint8>& message, | 304 const std::vector<uint8>& message, |
| 302 const std::string& default_url) { | 305 const std::string& default_url) { |
| 303 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 306 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 304 key_message_cb_.Run(session_id, message, default_url); | 307 key_message_cb_.Run(session_id, message, default_url); |
| 305 } | 308 } |
| 306 | 309 |
| 307 } // namespace content | 310 } // namespace content |
| OLD | NEW |