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

Side by Side Diff: content/browser/android/media_player_manager_impl.cc

Issue 18081003: Fix fullscreen video bugs on TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/android/media_player_manager_impl.h" 5 #include "content/browser/android/media_player_manager_impl.h"
6 6
7 #include "content/browser/android/content_view_core_impl.h" 7 #include "content/browser/android/content_view_core_impl.h"
8 #include "content/browser/android/media_resource_getter_impl.h" 8 #include "content/browser/android/media_resource_getter_impl.h"
9 #include "content/browser/web_contents/web_contents_view_android.h" 9 #include "content/browser/web_contents/web_contents_view_android.h"
10 #include "content/common/media/media_player_messages_android.h" 10 #include "content/common/media/media_player_messages_android.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 void MediaPlayerManagerImpl::FullscreenPlayerSeek(int msec) { 112 void MediaPlayerManagerImpl::FullscreenPlayerSeek(int msec) {
113 MediaPlayerAndroid* player = GetFullscreenPlayer(); 113 MediaPlayerAndroid* player = GetFullscreenPlayer();
114 if (player) 114 if (player)
115 player->SeekTo(base::TimeDelta::FromMilliseconds(msec)); 115 player->SeekTo(base::TimeDelta::FromMilliseconds(msec));
116 } 116 }
117 117
118 void MediaPlayerManagerImpl::ExitFullscreen(bool release_media_player) { 118 void MediaPlayerManagerImpl::ExitFullscreen(bool release_media_player) {
119 Send(new MediaPlayerMsg_DidExitFullscreen( 119 Send(new MediaPlayerMsg_DidExitFullscreen(
120 routing_id(), fullscreen_player_id_)); 120 routing_id(), fullscreen_player_id_));
121 fullscreen_player_id_ = -1;
122 video_view_.reset(); 121 video_view_.reset();
123 MediaPlayerAndroid* player = GetFullscreenPlayer(); 122 MediaPlayerAndroid* player = GetFullscreenPlayer();
123 fullscreen_player_id_ = -1;
124 if (!player) 124 if (!player)
125 return; 125 return;
126 if (release_media_player) 126 if (release_media_player)
127 player->Release(); 127 player->Release();
128 else 128 else
129 player->SetVideoSurface(gfx::ScopedJavaSurface()); 129 player->SetVideoSurface(gfx::ScopedJavaSurface());
130 } 130 }
131 131
132 void MediaPlayerManagerImpl::OnTimeUpdate(int player_id, 132 void MediaPlayerManagerImpl::OnTimeUpdate(int player_id,
133 base::TimeDelta current_time) { 133 base::TimeDelta current_time) {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 if (!player || !drm_bridge) { 515 if (!player || !drm_bridge) {
516 NOTREACHED() << "OnSetMediaKeys(): Player and MediaKeys must be present."; 516 NOTREACHED() << "OnSetMediaKeys(): Player and MediaKeys must be present.";
517 return; 517 return;
518 } 518 }
519 // TODO(qinmin): add the logic to decide whether we should create the 519 // TODO(qinmin): add the logic to decide whether we should create the
520 // fullscreen surface for EME lv1. 520 // fullscreen surface for EME lv1.
521 player->SetDrmBridge(drm_bridge); 521 player->SetDrmBridge(drm_bridge);
522 } 522 }
523 523
524 } // namespace content 524 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698