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

Side by Side Diff: content/renderer/media/android/renderer_media_player_manager.cc

Issue 181903003: Reland r253665 "Rename MediaKeys*Msg to Cdm*Msg." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/android/renderer_media_player_manager.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/android/renderer_media_player_manager.h" 5 #include "content/renderer/media/android/renderer_media_player_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/common/media/media_player_messages_android.h" 9 #include "content/common/media/media_player_messages_android.h"
10 #include "content/renderer/media/android/proxy_media_keys.h" 10 #include "content/renderer/media/android/proxy_media_keys.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 IPC_MESSAGE_HANDLER(MediaPlayerMsg_ConnectedToRemoteDevice, 57 IPC_MESSAGE_HANDLER(MediaPlayerMsg_ConnectedToRemoteDevice,
58 OnConnectedToRemoteDevice) 58 OnConnectedToRemoteDevice)
59 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DisconnectedFromRemoteDevice, 59 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DisconnectedFromRemoteDevice,
60 OnDisconnectedFromRemoteDevice) 60 OnDisconnectedFromRemoteDevice)
61 IPC_MESSAGE_HANDLER(MediaPlayerMsg_RequestFullscreen, 61 IPC_MESSAGE_HANDLER(MediaPlayerMsg_RequestFullscreen,
62 OnRequestFullscreen) 62 OnRequestFullscreen)
63 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidEnterFullscreen, OnDidEnterFullscreen) 63 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidEnterFullscreen, OnDidEnterFullscreen)
64 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidExitFullscreen, OnDidExitFullscreen) 64 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidExitFullscreen, OnDidExitFullscreen)
65 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidMediaPlayerPlay, OnPlayerPlay) 65 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidMediaPlayerPlay, OnPlayerPlay)
66 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidMediaPlayerPause, OnPlayerPause) 66 IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidMediaPlayerPause, OnPlayerPause)
67 IPC_MESSAGE_HANDLER(MediaKeysMsg_SessionCreated, OnSessionCreated) 67 IPC_MESSAGE_HANDLER(CdmMsg_SessionCreated, OnSessionCreated)
68 IPC_MESSAGE_HANDLER(MediaKeysMsg_SessionMessage, OnSessionMessage) 68 IPC_MESSAGE_HANDLER(CdmMsg_SessionMessage, OnSessionMessage)
69 IPC_MESSAGE_HANDLER(MediaKeysMsg_SessionReady, OnSessionReady) 69 IPC_MESSAGE_HANDLER(CdmMsg_SessionReady, OnSessionReady)
70 IPC_MESSAGE_HANDLER(MediaKeysMsg_SessionClosed, OnSessionClosed) 70 IPC_MESSAGE_HANDLER(CdmMsg_SessionClosed, OnSessionClosed)
71 IPC_MESSAGE_HANDLER(MediaKeysMsg_SessionError, OnSessionError) 71 IPC_MESSAGE_HANDLER(CdmMsg_SessionError, OnSessionError)
72 IPC_MESSAGE_UNHANDLED(handled = false) 72 IPC_MESSAGE_UNHANDLED(handled = false)
73 IPC_END_MESSAGE_MAP() 73 IPC_END_MESSAGE_MAP()
74 return handled; 74 return handled;
75 } 75 }
76 76
77 void RendererMediaPlayerManager::Initialize( 77 void RendererMediaPlayerManager::Initialize(
78 MediaPlayerHostMsg_Initialize_Type type, 78 MediaPlayerHostMsg_Initialize_Type type,
79 int player_id, 79 int player_id,
80 const GURL& url, 80 const GURL& url,
81 const GURL& first_party_for_cookies, 81 const GURL& first_party_for_cookies,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void RendererMediaPlayerManager::ExitFullscreen(int player_id) { 236 void RendererMediaPlayerManager::ExitFullscreen(int player_id) {
237 pending_fullscreen_frame_ = NULL; 237 pending_fullscreen_frame_ = NULL;
238 Send(new MediaPlayerHostMsg_ExitFullscreen(routing_id(), player_id)); 238 Send(new MediaPlayerHostMsg_ExitFullscreen(routing_id(), player_id));
239 } 239 }
240 240
241 void RendererMediaPlayerManager::InitializeCDM(int media_keys_id, 241 void RendererMediaPlayerManager::InitializeCDM(int media_keys_id,
242 ProxyMediaKeys* media_keys, 242 ProxyMediaKeys* media_keys,
243 const std::vector<uint8>& uuid, 243 const std::vector<uint8>& uuid,
244 const GURL& frame_url) { 244 const GURL& frame_url) {
245 RegisterMediaKeys(media_keys_id, media_keys); 245 RegisterMediaKeys(media_keys_id, media_keys);
246 Send(new MediaKeysHostMsg_InitializeCDM( 246 Send(new CdmHostMsg_InitializeCDM(
247 routing_id(), media_keys_id, uuid, frame_url)); 247 routing_id(), media_keys_id, uuid, frame_url));
248 } 248 }
249 249
250 void RendererMediaPlayerManager::CreateSession( 250 void RendererMediaPlayerManager::CreateSession(
251 int media_keys_id, 251 int media_keys_id,
252 uint32 session_id, 252 uint32 session_id,
253 MediaKeysHostMsg_CreateSession_Type type, 253 CdmHostMsg_CreateSession_Type type,
254 const std::vector<uint8>& init_data) { 254 const std::vector<uint8>& init_data) {
255 Send(new MediaKeysHostMsg_CreateSession( 255 Send(new CdmHostMsg_CreateSession(
256 routing_id(), media_keys_id, session_id, type, init_data)); 256 routing_id(), media_keys_id, session_id, type, init_data));
257 } 257 }
258 258
259 void RendererMediaPlayerManager::UpdateSession( 259 void RendererMediaPlayerManager::UpdateSession(
260 int media_keys_id, 260 int media_keys_id,
261 uint32 session_id, 261 uint32 session_id,
262 const std::vector<uint8>& response) { 262 const std::vector<uint8>& response) {
263 Send(new MediaKeysHostMsg_UpdateSession( 263 Send(new CdmHostMsg_UpdateSession(
264 routing_id(), media_keys_id, session_id, response)); 264 routing_id(), media_keys_id, session_id, response));
265 } 265 }
266 266
267 void RendererMediaPlayerManager::ReleaseSession(int media_keys_id, 267 void RendererMediaPlayerManager::ReleaseSession(int media_keys_id,
268 uint32 session_id) { 268 uint32 session_id) {
269 Send(new MediaKeysHostMsg_ReleaseSession( 269 Send(new CdmHostMsg_ReleaseSession(routing_id(), media_keys_id, session_id));
270 routing_id(), media_keys_id, session_id));
271 } 270 }
272 271
273 void RendererMediaPlayerManager::DestroyCdm(int media_keys_id) { 272 void RendererMediaPlayerManager::DestroyCdm(int media_keys_id) {
274 Send(new MediaKeysHostMsg_DestroyCdm(routing_id(), media_keys_id)); 273 Send(new CdmHostMsg_DestroyCdm(routing_id(), media_keys_id));
275 } 274 }
276 275
277 void RendererMediaPlayerManager::OnSessionCreated( 276 void RendererMediaPlayerManager::OnSessionCreated(
278 int media_keys_id, 277 int media_keys_id,
279 uint32 session_id, 278 uint32 session_id,
280 const std::string& web_session_id) { 279 const std::string& web_session_id) {
281 if (web_session_id.length() > kEmeWebSessionIdMaximum) { 280 if (web_session_id.length() > kEmeWebSessionIdMaximum) {
282 OnSessionError( 281 OnSessionError(
283 media_keys_id, session_id, media::MediaKeys::kUnknownError, 0); 282 media_keys_id, session_id, media::MediaKeys::kUnknownError, 0);
284 return; 283 return;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 431
433 if (player && player->hasVideo()) { 432 if (player && player->hasVideo()) {
434 if (player->UpdateBoundaryRectangle()) 433 if (player->UpdateBoundaryRectangle())
435 (*changes)[player_it->first] = player->GetBoundaryRectangle(); 434 (*changes)[player_it->first] = player->GetBoundaryRectangle();
436 } 435 }
437 } 436 }
438 } 437 }
439 #endif // defined(VIDEO_HOLE) 438 #endif // defined(VIDEO_HOLE)
440 439
441 } // namespace content 440 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/renderer_media_player_manager.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698