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(); |