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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 378543002: Skip to enter the fullscreen automatically when hole-punching is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: guarded by VIDEO_HOLE. Created 6 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 | Annotate | Revision Log
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/browser/media/android/browser_media_player_manager.h" 5 #include "content/browser/media/android/browser_media_player_manager.h"
6 6
7 #include "base/android/scoped_java_ref.h" 7 #include "base/android/scoped_java_ref.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/browser/android/content_view_core_impl.h" 9 #include "content/browser/android/content_view_core_impl.h"
10 #include "content/browser/media/android/browser_demuxer_android.h" 10 #include "content/browser/media/android/browser_demuxer_android.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 if (fullscreen_player_id_ != -1) { 317 if (fullscreen_player_id_ != -1) {
318 // TODO(qinmin): Determine the correct error code we should report to WMPA. 318 // TODO(qinmin): Determine the correct error code we should report to WMPA.
319 OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE); 319 OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE);
320 return; 320 return;
321 } 321 }
322 322
323 Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id)); 323 Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id));
324 } 324 }
325 325
326 #if defined(VIDEO_HOLE) 326 #if defined(VIDEO_HOLE)
327 bool
328 BrowserMediaPlayerManager::ShouldUseVideoOverlayForEmbeddedEncryptedVideo() {
329 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs();
330 return prefs->use_video_overlay_for_embedded_encrypted_video;
331 }
332
327 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id, 333 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id,
328 jobject surface) { 334 jobject surface) {
329 MediaPlayerAndroid* player = GetPlayer(player_id); 335 MediaPlayerAndroid* player = GetPlayer(player_id);
330 if (player) { 336 if (player) {
331 player->SetVideoSurface( 337 player->SetVideoSurface(
332 gfx::ScopedJavaSurface::AcquireExternalSurface(surface)); 338 gfx::ScopedJavaSurface::AcquireExternalSurface(surface));
333 } 339 }
334 } 340 }
335 341
336 void BrowserMediaPlayerManager::DetachExternalVideoSurface(int player_id) { 342 void BrowserMediaPlayerManager::DetachExternalVideoSurface(int player_id) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 #if defined(VIDEO_HOLE) 574 #if defined(VIDEO_HOLE)
569 MediaPlayerAndroid* player = GetPlayer(player_id); 575 MediaPlayerAndroid* player = GetPlayer(player_id);
570 if (player && player->IsSurfaceInUse()) 576 if (player && player->IsSurfaceInUse())
571 return; 577 return;
572 if (external_video_surface_container_) 578 if (external_video_surface_container_)
573 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 579 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
574 #endif // defined(VIDEO_HOLE) 580 #endif // defined(VIDEO_HOLE)
575 } 581 }
576 582
577 } // namespace content 583 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/android/browser_media_player_manager.h ('k') | media/base/android/media_player_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698