| 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) {
|
|
|