Chromium Code Reviews| Index: content/browser/media/android/browser_media_player_manager.cc |
| diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc |
| index 2273b5cdc23e4ad81c7bcd4393ebe896a3d8d5e0..f42b3cd0bc3170fa3c50820254a7e081122a8d6c 100644 |
| --- a/content/browser/media/android/browser_media_player_manager.cc |
| +++ b/content/browser/media/android/browser_media_player_manager.cc |
| @@ -123,11 +123,9 @@ bool BrowserMediaPlayerManager::OnMessageReceived(const IPC::Message& msg) { |
| DestroyAllMediaPlayers) |
| IPC_MESSAGE_HANDLER(MediaKeysHostMsg_InitializeCDM, |
| OnInitializeCDM) |
| - IPC_MESSAGE_HANDLER(MediaKeysHostMsg_GenerateKeyRequest, |
| - OnGenerateKeyRequest) |
| - IPC_MESSAGE_HANDLER(MediaKeysHostMsg_AddKey, OnAddKey) |
| - IPC_MESSAGE_HANDLER(MediaKeysHostMsg_CancelKeyRequest, |
| - OnCancelKeyRequest) |
| + IPC_MESSAGE_HANDLER(MediaKeysHostMsg_CreateSession, OnCreateSession) |
| + IPC_MESSAGE_HANDLER(MediaKeysHostMsg_UpdateSession, OnUpdateSession) |
| + IPC_MESSAGE_HANDLER(MediaKeysHostMsg_ReleaseSession, OnReleaseSession) |
| #if defined(GOOGLE_TV) |
| IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_NotifyExternalSurface, |
| OnNotifyExternalSurface) |
| @@ -355,7 +353,7 @@ void BrowserMediaPlayerManager::OnProtectedSurfaceRequested(int player_id) { |
| // During the process, DisableFullscreenEncryptedMediaPlayback() may get |
| // called before or after OnEnterFullscreen(). If it is called before |
| // OnEnterFullscreen(), the player will not enter fullscreen. And it will |
| - // retry the process once the GenerateKeyRequest is allowed to proceed |
| + // retry the process once the CreateSession() is allowed to proceed |
|
xhwang
2013/12/03 17:47:48
drop the second "the"
jrummell
2013/12/03 19:33:16
Done.
|
| // TODO(qinmin): make this flag default on android. |
| if (CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kDisableGestureRequirementForMediaFullscreen)) { |
| @@ -369,7 +367,7 @@ void BrowserMediaPlayerManager::OnSessionCreated( |
| int media_keys_id, |
| uint32 reference_id, |
| const std::string& session_id) { |
| - Send(new MediaKeysMsg_SetSessionId( |
| + Send(new MediaKeysMsg_SessionCreated( |
| routing_id(), media_keys_id, reference_id, session_id)); |
| } |
| @@ -378,17 +376,20 @@ void BrowserMediaPlayerManager::OnSessionMessage( |
| uint32 reference_id, |
| const std::vector<uint8>& message, |
| const std::string& destination_url) { |
| - Send(new MediaKeysMsg_KeyMessage( |
| + Send(new MediaKeysMsg_SessionMessage( |
| routing_id(), media_keys_id, reference_id, message, destination_url)); |
| } |
| void BrowserMediaPlayerManager::OnSessionReady(int media_keys_id, |
| uint32 reference_id) { |
| - Send(new MediaKeysMsg_KeyAdded(routing_id(), media_keys_id, reference_id)); |
| + Send(new MediaKeysMsg_SessionReady( |
| + routing_id(), media_keys_id, reference_id)); |
| } |
| void BrowserMediaPlayerManager::OnSessionClosed(int media_keys_id, |
| uint32 reference_id) { |
| + Send(new MediaKeysMsg_SessionClosed( |
| + routing_id(), media_keys_id, reference_id)); |
| // TODO(jrummell): Update Android calls and IPC names. |
|
xhwang
2013/12/03 17:47:48
do we still need this todo?
jrummell
2013/12/03 19:33:16
Nope. Removed.
|
| } |
| @@ -397,8 +398,8 @@ void BrowserMediaPlayerManager::OnSessionError( |
| uint32 reference_id, |
| media::MediaKeys::KeyError error_code, |
| int system_code) { |
| - Send(new MediaKeysMsg_KeyError(routing_id(), media_keys_id, |
| - reference_id, error_code, system_code)); |
| + Send(new MediaKeysMsg_SessionError( |
| + routing_id(), media_keys_id, reference_id, error_code, system_code)); |
| } |
| #if defined(GOOGLE_TV) |
| @@ -552,7 +553,7 @@ void BrowserMediaPlayerManager::OnInitializeCDM( |
| OnSetMediaKeys(media_keys_id, media_keys_id); |
| } |
| -void BrowserMediaPlayerManager::OnGenerateKeyRequest( |
| +void BrowserMediaPlayerManager::OnCreateSession( |
| int media_keys_id, |
| uint32 reference_id, |
| const std::string& type, |
| @@ -586,10 +587,11 @@ void BrowserMediaPlayerManager::OnGenerateKeyRequest( |
| init_data)); |
| } |
| -void BrowserMediaPlayerManager::OnAddKey(int media_keys_id, |
| - uint32 reference_id, |
| - const std::vector<uint8>& key, |
| - const std::vector<uint8>& init_data) { |
| +void BrowserMediaPlayerManager::OnUpdateSession( |
| + int media_keys_id, |
| + uint32 reference_id, |
| + const std::vector<uint8>& key, |
|
ddorwin
2013/12/03 18:11:30
ditto x2
jrummell
2013/12/03 19:33:16
Done.
|
| + const std::vector<uint8>& init_data) { |
| MediaDrmBridge* drm_bridge = GetDrmBridge(media_keys_id); |
| if (!drm_bridge) { |
| DLOG(WARNING) << "No MediaDrmBridge for ID: " << media_keys_id << " found"; |
| @@ -608,7 +610,7 @@ void BrowserMediaPlayerManager::OnAddKey(int media_keys_id, |
| player->OnKeyAdded(); |
| } |
| -void BrowserMediaPlayerManager::OnCancelKeyRequest( |
| +void BrowserMediaPlayerManager::OnReleaseSession( |
| int media_keys_id, |
| uint32 reference_id) { |
| MediaDrmBridge* drm_bridge = GetDrmBridge(media_keys_id); |