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

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

Issue 281523003: Fix the flaky test, ExternalVideoSurfaceContainerTest#testEnableVideoOverlayForEmbeddedVideo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | 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/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 media_log_(media_log), 121 media_log_(media_log),
122 web_cdm_(NULL), 122 web_cdm_(NULL),
123 weak_factory_(this) { 123 weak_factory_(this) {
124 DCHECK(manager_); 124 DCHECK(manager_);
125 125
126 DCHECK(main_thread_checker_.CalledOnValidThread()); 126 DCHECK(main_thread_checker_.CalledOnValidThread());
127 127
128 player_id_ = manager_->RegisterMediaPlayer(this); 128 player_id_ = manager_->RegisterMediaPlayer(this);
129 129
130 #if defined(VIDEO_HOLE) 130 #if defined(VIDEO_HOLE)
131 if (manager_->ShouldUseVideoOverlayForEmbeddedEncryptedVideo()) { 131 force_use_overlay_embedded_video_ = CommandLine::ForCurrentProcess()->
132 HasSwitch(switches::kForceUseOverlayEmbeddedVideo);
133 if (force_use_overlay_embedded_video_ ||
134 manager_->ShouldUseVideoOverlayForEmbeddedEncryptedVideo()) {
132 // Defer stream texture creation until we are sure it's necessary. 135 // Defer stream texture creation until we are sure it's necessary.
133 needs_establish_peer_ = false; 136 needs_establish_peer_ = false;
134 current_frame_ = VideoFrame::CreateBlackFrame(gfx::Size(1, 1)); 137 current_frame_ = VideoFrame::CreateBlackFrame(gfx::Size(1, 1));
135 } 138 }
136 force_use_overlay_embedded_video_ = CommandLine::ForCurrentProcess()->
137 HasSwitch(switches::kForceUseOverlayEmbeddedVideo);
138 #endif // defined(VIDEO_HOLE) 139 #endif // defined(VIDEO_HOLE)
139 TryCreateStreamTextureProxyIfNeeded(); 140 TryCreateStreamTextureProxyIfNeeded();
140 } 141 }
141 142
142 WebMediaPlayerAndroid::~WebMediaPlayerAndroid() { 143 WebMediaPlayerAndroid::~WebMediaPlayerAndroid() {
143 SetVideoFrameProviderClient(NULL); 144 SetVideoFrameProviderClient(NULL);
144 client_->setWebLayer(NULL); 145 client_->setWebLayer(NULL);
145 146
146 if (manager_) { 147 if (manager_) {
147 manager_->DestroyPlayer(player_id_); 148 manager_->DestroyPlayer(player_id_);
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 1554
1554 void WebMediaPlayerAndroid::exitFullscreen() { 1555 void WebMediaPlayerAndroid::exitFullscreen() {
1555 manager_->ExitFullscreen(player_id_); 1556 manager_->ExitFullscreen(player_id_);
1556 } 1557 }
1557 1558
1558 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1559 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1559 return manager_->CanEnterFullscreen(frame_); 1560 return manager_->CanEnterFullscreen(frame_);
1560 } 1561 }
1561 1562
1562 } // namespace content 1563 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698