summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/renderer/media/crypto/ppapi_decryptor.cc5
-rw-r--r--content/renderer/pepper/content_decryptor_delegate.cc11
-rw-r--r--content/renderer/pepper/content_decryptor_delegate.h3
-rw-r--r--content/renderer/pepper/pepper_plugin_instance_impl.cc8
-rw-r--r--content/renderer/pepper/pepper_plugin_instance_impl.h4
5 files changed, 14 insertions, 17 deletions
diff --git a/content/renderer/media/crypto/ppapi_decryptor.cc b/content/renderer/media/crypto/ppapi_decryptor.cc
index 8d5bdf9..80f8149 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.cc
+++ b/content/renderer/media/crypto/ppapi_decryptor.cc
@@ -36,7 +36,10 @@ scoped_ptr<PpapiDecryptor> PpapiDecryptor::Create(
return scoped_ptr<PpapiDecryptor>();
}
- plugin_cdm_delegate->Initialize(key_system);
+ // TODO(jrummell): How do we get the can_challenge_platform value from
+ // the browser?
+ const bool can_challenge_platform = false;
+ plugin_cdm_delegate->Initialize(key_system, can_challenge_platform);
return scoped_ptr<PpapiDecryptor>(new PpapiDecryptor(plugin_instance,
plugin_cdm_delegate,
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc
index 94d8928..ce91037 100644
--- a/content/renderer/pepper/content_decryptor_delegate.cc
+++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -243,10 +243,16 @@ ContentDecryptorDelegate::ContentDecryptorDelegate(
ContentDecryptorDelegate::~ContentDecryptorDelegate() {
}
-void ContentDecryptorDelegate::Initialize(const std::string& key_system) {
- // TODO(ddorwin): Add an Initialize method to PPP_ContentDecryptor_Private.
+void ContentDecryptorDelegate::Initialize(const std::string& key_system,
+ bool can_challenge_platform) {
DCHECK(!key_system.empty());
+ DCHECK(key_system_.empty());
key_system_ = key_system;
+
+ plugin_decryption_interface_->Initialize(
+ pp_instance_,
+ StringVar::StringToPPVar(key_system_),
+ PP_FromBool(can_challenge_platform));
}
void ContentDecryptorDelegate::SetKeyEventCallbacks(
@@ -267,7 +273,6 @@ bool ContentDecryptorDelegate::GenerateKeyRequest(const std::string& type,
plugin_decryption_interface_->GenerateKeyRequest(
pp_instance_,
- StringVar::StringToPPVar(key_system_), // TODO(ddorwin): Remove.
StringVar::StringToPPVar(type),
init_data_array);
return true;
diff --git a/content/renderer/pepper/content_decryptor_delegate.h b/content/renderer/pepper/content_decryptor_delegate.h
index ca54d98..f58ef9f 100644
--- a/content/renderer/pepper/content_decryptor_delegate.h
+++ b/content/renderer/pepper/content_decryptor_delegate.h
@@ -39,7 +39,8 @@ class ContentDecryptorDelegate {
const PPP_ContentDecryptor_Private* plugin_decryption_interface);
~ContentDecryptorDelegate();
- void Initialize(const std::string& key_system);
+ void Initialize(const std::string& key_system,
+ const bool can_challenge_platform);
void SetKeyEventCallbacks(const media::KeyAddedCB& key_added_cb,
const media::KeyErrorCB& key_error_cb,
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index c95d3fe..988d066 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -2179,14 +2179,6 @@ PP_Var PepperPluginInstanceImpl::GetDefaultCharSet(PP_Instance instance) {
// PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|.
// Therefore, |content_decryptor_delegate_| must have been initialized when
// the following methods are called.
-void PepperPluginInstanceImpl::NeedKey(PP_Instance instance,
- PP_Var key_system_var,
- PP_Var session_id_var,
- PP_Var init_data_var) {
- content_decryptor_delegate_->NeedKey(
- key_system_var, session_id_var, init_data_var);
-}
-
void PepperPluginInstanceImpl::KeyAdded(PP_Instance instance,
PP_Var key_system_var,
PP_Var session_id_var) {
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index a700798..3113820 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -442,10 +442,6 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
PP_URLComponents_Dev* components) OVERRIDE;
// PPB_ContentDecryptor_Private implementation.
- virtual void NeedKey(PP_Instance instance,
- PP_Var key_system,
- PP_Var session_id,
- PP_Var init_data) OVERRIDE;
virtual void KeyAdded(PP_Instance instance,
PP_Var key_system,
PP_Var session_id) OVERRIDE;