| Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| index 81c0e66bbdf1b9b6aab0ebf05adf61937167a0fb..4c209a9bd5584d08a42721a53201af8fdee389eb 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/frame/Settings.h"
|
| #include "core/html/HTMLMediaElement.h"
|
| #include "core/html/shadow/MediaControlsMediaEventListener.h"
|
| +#include "core/html/shadow/MediaControlsOrientationLockDelegate.h"
|
| #include "core/html/shadow/MediaControlsWindowEventListener.h"
|
| #include "core/html/track/TextTrackContainer.h"
|
| #include "core/html/track/TextTrackList.h"
|
| @@ -127,6 +128,7 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
|
| m_windowEventListener(MediaControlsWindowEventListener::create(
|
| this,
|
| WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))),
|
| + m_orientationLockDelegate(nullptr),
|
| m_hideMediaControlsTimer(this,
|
| &MediaControls::hideMediaControlsTimerFired),
|
| m_hideTimerBehaviorFlags(IgnoreNone),
|
| @@ -141,6 +143,14 @@ MediaControls* MediaControls::create(HTMLMediaElement& mediaElement) {
|
| MediaControls* controls = new MediaControls(mediaElement);
|
| controls->setShadowPseudoId(AtomicString("-webkit-media-controls"));
|
| controls->initializeControls();
|
| +
|
| + // Initialize the orientation lock when going fullscreen feature.
|
| + if (RuntimeEnabledFeatures::videoFullscreenOrientationLockEnabled() &&
|
| + mediaElement.isHTMLVideoElement()) {
|
| + controls->m_orientationLockDelegate =
|
| + new MediaControlsOrientationLockDelegate(controls);
|
| + }
|
| +
|
| return controls;
|
| }
|
|
|
| @@ -926,6 +936,7 @@ DEFINE_TRACE(MediaControls) {
|
| visitor->trace(m_overlayCastButton);
|
| visitor->trace(m_mediaEventListener);
|
| visitor->trace(m_windowEventListener);
|
| + visitor->trace(m_orientationLockDelegate);
|
| HTMLDivElement::trace(visitor);
|
| }
|
|
|
|
|