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

Unified Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 1102363005: Initialize the CDM asynchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + Android compile changes Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.h ('k') | media/base/cdm_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/content_decryptor_delegate.cc
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc
index 0cf812d6939f39beddfc7e4423ec2f1534ed7b51..82f9894376ba9464c3eb0841942c3946c44b38f4 100644
--- a/content/renderer/pepper/content_decryptor_delegate.cc
+++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -382,7 +382,8 @@ void ContentDecryptorDelegate::Initialize(
const media::LegacySessionErrorCB& legacy_session_error_cb,
const media::SessionKeysChangeCB& session_keys_change_cb,
const media::SessionExpirationUpdateCB& session_expiration_update_cb,
- const base::Closure& fatal_plugin_error_cb) {
+ const base::Closure& fatal_plugin_error_cb,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
DCHECK(!key_system.empty());
DCHECK(key_system_.empty());
key_system_ = key_system;
@@ -394,8 +395,9 @@ void ContentDecryptorDelegate::Initialize(
session_expiration_update_cb_ = session_expiration_update_cb;
fatal_plugin_error_cb_ = fatal_plugin_error_cb;
+ uint32_t promise_id = cdm_promise_adapter_.SavePromise(promise.Pass());
plugin_decryption_interface_->Initialize(
- pp_instance_, StringVar::StringToPPVar(key_system_),
+ pp_instance_, promise_id, StringVar::StringToPPVar(key_system_),
PP_FromBool(allow_distinctive_identifier),
PP_FromBool(allow_persistent_state));
}
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.h ('k') | media/base/cdm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698