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

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: rebase only 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
« no previous file with comments | « content/renderer/media/crypto/ppapi_decryptor.h ('k') | content/renderer/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..350bfa199f71c0fd0230991cc94372b2fe425234 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.cc
+++ b/content/renderer/media/crypto/ppapi_decryptor.cc
@@ -97,16 +97,15 @@ 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__;
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- DCHECK(plugin_cdm_delegate_);
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;
}
@@ -114,6 +113,19 @@ bool PpapiDecryptor::CreateSession(uint32 session_id,
return true;
}
+void PpapiDecryptor::LoadSession(uint32 session_id,
+ const std::string& web_session_id) {
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+
+ if (!plugin_cdm_delegate_) {
+ ReportFailureToCallPlugin(session_id);
+ return;
+ }
+
+ plugin_cdm_delegate_->LoadSession(session_id, web_session_id);
+}
+
void PpapiDecryptor::UpdateSession(uint32 session_id,
const uint8* response,
int response_length) {
@@ -123,6 +135,7 @@ void PpapiDecryptor::UpdateSession(uint32 session_id,
if (!plugin_cdm_delegate_ || !plugin_cdm_delegate_->UpdateSession(
session_id, response, response_length)) {
ReportFailureToCallPlugin(session_id);
+ return;
}
if (!new_audio_key_cb_.is_null())
@@ -139,6 +152,7 @@ void PpapiDecryptor::ReleaseSession(uint32 session_id) {
if (!plugin_cdm_delegate_ ||
!plugin_cdm_delegate_->ReleaseSession(session_id)) {
ReportFailureToCallPlugin(session_id);
+ return;
}
}
« no previous file with comments | « content/renderer/media/crypto/ppapi_decryptor.h ('k') | content/renderer/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698