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

Unified Diff: content/renderer/media/android/proxy_media_keys.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/android/proxy_media_keys.h ('k') | content/renderer/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/proxy_media_keys.cc
diff --git a/content/renderer/media/android/proxy_media_keys.cc b/content/renderer/media/android/proxy_media_keys.cc
index ff9d0c54777048a28491d3910cedd669b501466f..c2022e33dfdb147f8a53b9ac5de8f3f5b60d1d4d 100644
--- a/content/renderer/media/android/proxy_media_keys.cc
+++ b/content/renderer/media/android/proxy_media_keys.cc
@@ -47,17 +47,19 @@ void ProxyMediaKeys::InitializeCDM(const std::string& key_system,
}
bool ProxyMediaKeys::CreateSession(uint32 session_id,
- const std::string& type,
+ const std::string& content_type,
const uint8* init_data,
int init_data_length) {
+ // TODO(xhwang): Move these checks up to blink and DCHECK here.
+ // See http://crbug.com/342510
MediaKeysHostMsg_CreateSession_Type session_type;
- if (type == "audio/mp4" || type == "video/mp4") {
+ if (content_type == "audio/mp4" || content_type == "video/mp4") {
session_type = CREATE_SESSION_TYPE_MP4;
- } else if (type == "audio/webm" || type == "video/webm") {
+ } else if (content_type == "audio/webm" || content_type == "video/webm") {
session_type = CREATE_SESSION_TYPE_WEBM;
} else {
- DLOG(ERROR) << "Unsupported EME CreateSession type of " << type;
- OnSessionError(session_id, media::MediaKeys::kUnknownError, 0);
+ DLOG(ERROR) << "Unsupported EME CreateSession content type of "
+ << content_type;
return false;
}
@@ -69,6 +71,14 @@ bool ProxyMediaKeys::CreateSession(uint32 session_id,
return true;
}
+void ProxyMediaKeys::LoadSession(uint32 session_id,
+ const std::string& web_session_id) {
+ // TODO(xhwang): Check key system and platform support for LoadSession in
+ // blink and add NOTREACHED() here.
+ DLOG(ERROR) << "ProxyMediaKeys doesn't support session loading.";
+ OnSessionError(session_id, media::MediaKeys::kUnknownError, 0);
+}
+
void ProxyMediaKeys::UpdateSession(uint32 session_id,
const uint8* response,
int response_length) {
« no previous file with comments | « content/renderer/media/android/proxy_media_keys.h ('k') | content/renderer/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698