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

Unified Diff: Source/core/html/shadow/MediaControlsAndroid.cpp

Issue 182613006: Remove media controls when not in use. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Track visibility in controls. 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/shadow/MediaControlsAndroid.cpp
diff --git a/Source/core/html/shadow/MediaControlsAndroid.cpp b/Source/core/html/shadow/MediaControlsAndroid.cpp
index 6943ae5f847da28221246aa63c2cba8c0265d5c2..9eedb8a12f76c5bfa8e93b832defb9e3837d9d90 100644
--- a/Source/core/html/shadow/MediaControlsAndroid.cpp
+++ b/Source/core/html/shadow/MediaControlsAndroid.cpp
@@ -66,6 +66,20 @@ void MediaControlsAndroid::setMediaController(MediaControllerInterface* controll
MediaControls::setMediaController(controller);
}
+void MediaControlsAndroid::show()
+{
+ m_overlayPlayButton->setVisible(true);
+ m_overlayPlayButton->updateDisplayType();
+ MediaControls::show();
+}
+
+void MediaControlsAndroid::hide()
+{
+ m_overlayPlayButton->setVisible(false);
+ m_overlayPlayButton->updateDisplayType();
acolwell GONE FROM CHROMIUM 2014/03/06 19:21:54 nit: It seems like you could unconditionally hide
philipj_slow 2014/03/18 04:14:13 Yes, when moving this into MediaControls.cpp try j
+ MediaControls::hide();
+}
+
void MediaControlsAndroid::playbackStarted()
{
m_overlayPlayButton->updateDisplayType();
acolwell GONE FROM CHROMIUM 2014/03/06 19:21:54 It seems like you could make this call and the one
Fredrik Öhrn 2014/03/07 09:45:45 Problem is that MediaControlOverlayPlayButtonEleme

Powered by Google App Engine
This is Rietveld 408576698