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

Unified Diff: content/browser/android/media_player_manager_impl.cc

Issue 17022008: Pass InitializeCDM() call through IPC to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years, 6 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/browser/android/media_player_manager_impl.cc
diff --git a/content/browser/android/media_player_manager_impl.cc b/content/browser/android/media_player_manager_impl.cc
index 93c355a8a4a99a7956751bb6a5baa92208014feb..73b1188ade2f39f6df6ebb2b7c43783c792b8c4f 100644
--- a/content/browser/android/media_player_manager_impl.cc
+++ b/content/browser/android/media_player_manager_impl.cc
@@ -75,10 +75,12 @@ bool MediaPlayerManagerImpl::OnMessageReceived(const IPC::Message& msg) {
OnDurationChanged)
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_MediaSeekRequestAck,
OnMediaSeekRequestAck)
- IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_GenerateKeyRequest,
+ IPC_MESSAGE_HANDLER(MediaKeysHostMsg_InitializeCDM,
+ OnInitializeCDM)
+ IPC_MESSAGE_HANDLER(MediaKeysHostMsg_GenerateKeyRequest,
OnGenerateKeyRequest)
- IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_AddKey, OnAddKey)
- IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_CancelKeyRequest,
+ IPC_MESSAGE_HANDLER(MediaKeysHostMsg_AddKey, OnAddKey)
+ IPC_MESSAGE_HANDLER(MediaKeysHostMsg_CancelKeyRequest,
OnCancelKeyRequest)
#if defined(GOOGLE_TV)
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_NotifyExternalSurface,
@@ -284,14 +286,14 @@ void MediaPlayerManagerImpl::OnMediaConfigRequest(int player_id) {
void MediaPlayerManagerImpl::OnKeyAdded(int media_keys_id,
const std::string& session_id) {
- Send(new MediaPlayerMsg_KeyAdded(routing_id(), media_keys_id, session_id));
+ Send(new MediaKeysMsg_KeyAdded(routing_id(), media_keys_id, session_id));
}
void MediaPlayerManagerImpl::OnKeyError(int media_keys_id,
const std::string& session_id,
media::MediaKeys::KeyError error_code,
int system_code) {
- Send(new MediaPlayerMsg_KeyError(routing_id(), media_keys_id,
+ Send(new MediaKeysMsg_KeyError(routing_id(), media_keys_id,
session_id, error_code, system_code));
}
@@ -299,7 +301,7 @@ void MediaPlayerManagerImpl::OnKeyMessage(int media_keys_id,
const std::string& session_id,
const std::string& message,
const std::string& destination_url) {
- Send(new MediaPlayerMsg_KeyMessage(routing_id(), media_keys_id, session_id,
+ Send(new MediaKeysMsg_KeyMessage(routing_id(), media_keys_id, session_id,
message, destination_url));
}
@@ -435,11 +437,15 @@ void MediaPlayerManagerImpl::OnMediaSeekRequestAck(
player->OnSeekRequestAck(seek_request_id);
}
+void MediaPlayerManagerImpl::OnInitializeCDM(int media_keys_id,
+ const std::vector<uint8>& uuid) {
+ // TODO(qinmin/xhwang): Create a MediaDrmBridge.
+}
+
void MediaPlayerManagerImpl::OnGenerateKeyRequest(
int media_keys_id,
const std::string& type,
const std::vector<uint8>& init_data) {
- // TODO(qinmin): add a new MediaDrmBridge if GetDrmBridge() returns NULL.
MediaDrmBridge* drm_bridge = GetDrmBridge(media_keys_id);
if (drm_bridge) {
drm_bridge->GenerateKeyRequest(type, &init_data[0], init_data.size());
« no previous file with comments | « content/browser/android/media_player_manager_impl.h ('k') | content/common/media/media_player_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698