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

Unified Diff: content/renderer/media/android/renderer_media_player_manager.cc

Issue 41123002: Request video element to enter fullscreen when playing protected content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/renderer/media/android/renderer_media_player_manager.cc
diff --git a/content/renderer/media/android/renderer_media_player_manager.cc b/content/renderer/media/android/renderer_media_player_manager.cc
index 4750549f387b5b23faa057eebd00d993a9b2eb0c..5cc92ad538bfb7e20bf13e61695bc6ad8e35ebcc 100644
--- a/content/renderer/media/android/renderer_media_player_manager.cc
+++ b/content/renderer/media/android/renderer_media_player_manager.cc
@@ -51,6 +51,8 @@ bool RendererMediaPlayerManager::OnMessageReceived(const IPC::Message& msg) {
OnConnectedToRemoteDevice)
IPC_MESSAGE_HANDLER(MediaPlayerMsg_DisconnectedFromRemoteDevice,
OnDisconnectedFromRemoteDevice)
+ IPC_MESSAGE_HANDLER(MediaPlayerMsg_RequestFullscreen,
+ OnRequestFullscreen)
IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidEnterFullscreen, OnDidEnterFullscreen)
IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidExitFullscreen, OnDidExitFullscreen)
IPC_MESSAGE_HANDLER(MediaPlayerMsg_DidMediaPlayerPlay, OnPlayerPlay)
@@ -206,6 +208,12 @@ void RendererMediaPlayerManager::OnPlayerPause(int player_id) {
player->OnMediaPlayerPause();
}
+void RendererMediaPlayerManager::OnRequestFullscreen(int player_id) {
+ WebMediaPlayerAndroid* player = GetMediaPlayer(player_id);
+ if (player)
+ player->OnRequestFullscreen();
+}
+
void RendererMediaPlayerManager::EnterFullscreen(int player_id) {
Send(new MediaPlayerHostMsg_EnterFullscreen(routing_id(), player_id));
}

Powered by Google App Engine
This is Rietveld 408576698