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

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

Issue 254633002: Start using the mediaControlsOverlayPlayButtonEnabled setting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
« no previous file with comments | « Source/core/css/mediaControlsAndroid.css ('k') | Source/core/rendering/RenderThemeChromiumAndroid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index e2e5431ee3eee82a95a4b242692b452ae4047c7b..1b1a234275e528d7ea759827b70eb757ce30ff7e 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -29,18 +29,13 @@
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/events/MouseEvent.h"
+#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/MediaController.h"
#include "core/rendering/RenderTheme.h"
namespace WebCore {
-#if OS(ANDROID)
-static const bool needOverlayPlayButton = true;
-#else
-static const bool needOverlayPlayButton = false;
-#endif
-
static const double timeWithoutMouseMovementBeforeHidingMediaControls = 3;
MediaControls::MediaControls(HTMLMediaElement& mediaElement)
@@ -79,7 +74,7 @@ bool MediaControls::initializeControls()
{
TrackExceptionState exceptionState;
- if (needOverlayPlayButton) {
+ if (document().settings() && document().settings()->mediaControlsOverlayPlayButtonEnabled()) {
RefPtr<MediaControlOverlayEnclosureElement> overlayEnclosure = MediaControlOverlayEnclosureElement::create(*this);
RefPtr<MediaControlOverlayPlayButtonElement> overlayPlayButton = MediaControlOverlayPlayButtonElement::create(*this);
m_overlayPlayButton = overlayPlayButton.get();
« no previous file with comments | « Source/core/css/mediaControlsAndroid.css ('k') | Source/core/rendering/RenderThemeChromiumAndroid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698