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

Side by Side Diff: Source/core/html/shadow/MediaControls.cpp

Issue 196793021: Ignore MediaController in the video fullscreen button logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 | « Source/core/html/shadow/MediaControlElements.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/html/shadow/MediaControls.h" 28 #include "core/html/shadow/MediaControls.h"
29 29
30 #include "bindings/v8/ExceptionStatePlaceholder.h" 30 #include "bindings/v8/ExceptionStatePlaceholder.h"
31 #include "core/events/MouseEvent.h" 31 #include "core/events/MouseEvent.h"
32 #include "core/frame/Settings.h"
32 #include "core/html/HTMLMediaElement.h" 33 #include "core/html/HTMLMediaElement.h"
33 #include "core/html/MediaController.h" 34 #include "core/html/MediaController.h"
34 #include "core/rendering/RenderTheme.h" 35 #include "core/rendering/RenderTheme.h"
35 36
36 namespace WebCore { 37 namespace WebCore {
37 38
38 #if OS(ANDROID) 39 #if OS(ANDROID)
39 static const bool alwaysHideFullscreenControls = true; 40 static const bool alwaysHideFullscreenControls = true;
40 static const bool needOverlayPlayButton = true; 41 static const bool needOverlayPlayButton = true;
41 #else 42 #else
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 if (!mediaControllerInterface().hasAudio()) { 186 if (!mediaControllerInterface().hasAudio()) {
186 m_volumeSlider->hide(); 187 m_volumeSlider->hide();
187 } else { 188 } else {
188 m_volumeSlider->show(); 189 m_volumeSlider->show();
189 m_volumeSlider->setVolume(mediaControllerInterface().volume()); 190 m_volumeSlider->setVolume(mediaControllerInterface().volume());
190 } 191 }
191 192
192 refreshClosedCaptionsButtonVisibility(); 193 refreshClosedCaptionsButtonVisibility();
193 194
194 if (mediaControllerInterface().hasVideo()) 195 if (mediaElement().hasVideo() && document().settings() && document().setting s()->fullScreenEnabled())
195 m_fullScreenButton->show(); 196 m_fullScreenButton->show();
196 else 197 else
197 m_fullScreenButton->hide(); 198 m_fullScreenButton->hide();
198 199
199 makeOpaque(); 200 makeOpaque();
200 } 201 }
201 202
202 void MediaControls::show() 203 void MediaControls::show()
203 { 204 {
204 makeOpaque(); 205 makeOpaque();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 241
241 if (m_isFullscreen) 242 if (m_isFullscreen)
242 startHideFullscreenControlsTimer(); 243 startHideFullscreenControlsTimer();
243 } 244 }
244 245
245 void MediaControls::playbackProgressed() 246 void MediaControls::playbackProgressed()
246 { 247 {
247 m_timeline->setPosition(mediaControllerInterface().currentTime()); 248 m_timeline->setPosition(mediaControllerInterface().currentTime());
248 updateCurrentTimeDisplay(); 249 updateCurrentTimeDisplay();
249 250
250 if (!m_isMouseOverControls && mediaControllerInterface().hasVideo()) 251 if (!m_isMouseOverControls && mediaElement().hasVideo())
251 makeTransparent(); 252 makeTransparent();
252 } 253 }
253 254
254 void MediaControls::playbackStopped() 255 void MediaControls::playbackStopped()
255 { 256 {
256 if (m_overlayPlayButton) 257 if (m_overlayPlayButton)
257 m_overlayPlayButton->updateDisplayType(); 258 m_overlayPlayButton->updateDisplayType();
258 m_playButton->updateDisplayType(); 259 m_playButton->updateDisplayType();
259 m_timeline->setPosition(mediaControllerInterface().currentTime()); 260 m_timeline->setPosition(mediaControllerInterface().currentTime());
260 updateCurrentTimeDisplay(); 261 updateCurrentTimeDisplay();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 439
439 void MediaControls::updateTextTrackDisplay() 440 void MediaControls::updateTextTrackDisplay()
440 { 441 {
441 if (!m_textDisplayContainer) 442 if (!m_textDisplayContainer)
442 createTextTrackDisplay(); 443 createTextTrackDisplay();
443 444
444 m_textDisplayContainer->updateDisplay(); 445 m_textDisplayContainer->updateDisplay();
445 } 446 }
446 447
447 } 448 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698