Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: content/renderer/media/crypto/ppapi_decryptor.cc

Issue 24192004: Changes to the EME Pepper API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const bool can_challenge_platform = false;
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698