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

Unified Diff: content/renderer/media/crypto/ppapi_decryptor.cc

Issue 131653003: Support LoadSession() in MediaKeys and PPP_ContentDecryptor_Private interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: content/renderer/media/crypto/ppapi_decryptor.cc
diff --git a/content/renderer/media/crypto/ppapi_decryptor.cc b/content/renderer/media/crypto/ppapi_decryptor.cc
index cf7808c3f5d5312b66fee9ddccd3fdaf761fa21b..64c1fc7df823ba712aa5f4a037291fc5215ffe40 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.cc
+++ b/content/renderer/media/crypto/ppapi_decryptor.cc
@@ -97,7 +97,7 @@ PpapiDecryptor::~PpapiDecryptor() {
}
bool PpapiDecryptor::CreateSession(uint32 session_id,
- const std::string& type,
+ const std::string& content_type,
const uint8* init_data,
int init_data_length) {
DVLOG(2) << __FUNCTION__;
@@ -106,7 +106,22 @@ bool PpapiDecryptor::CreateSession(uint32 session_id,
if (!plugin_cdm_delegate_ ||
!plugin_cdm_delegate_->CreateSession(
- session_id, type, init_data, init_data_length)) {
+ session_id, content_type, init_data, init_data_length)) {
+ ReportFailureToCallPlugin(session_id);
+ return false;
+ }
+
+ return true;
+}
+
+bool PpapiDecryptor::LoadSession(uint32 session_id,
+ const std::string& web_session_id) {
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(plugin_cdm_delegate_);
ddorwin 2014/02/10 19:05:25 Why can this never happen here or in CreateSession
xhwang 2014/02/10 22:30:55 Removed.
+
+ if (!plugin_cdm_delegate_ ||
+ !plugin_cdm_delegate_->LoadSession(session_id, web_session_id)) {
ReportFailureToCallPlugin(session_id);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698