Index: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp |
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp |
index 2f32c0510fc28434d2ae7adb85c8c19b4a0dfffc..5a78bc51bc04e66c80506bdaf74f478949fd8eda 100644 |
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp |
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp |
@@ -313,21 +313,19 @@ MediaControlsImpl* MediaControlsImpl::Create(HTMLMediaElement& media_element, |
controls->InitializeControls(); |
controls->Reset(); |
- // RotateToFullscreen and FullscreenOrientationLock are not yet compatible |
- // so enabling RotateToFullscreen disables FullscreenOrientationLock. |
- // TODO(johnme): Make it possible to use both features simultaneously. |
+ if (RuntimeEnabledFeatures::videoFullscreenOrientationLockEnabled() && |
+ media_element.IsHTMLVideoElement()) { |
+ // Initialize the orientation lock when going fullscreen feature. |
+ controls->orientation_lock_delegate_ = |
+ new MediaControlsOrientationLockDelegate( |
+ toHTMLVideoElement(media_element)); |
+ } |
if (RuntimeEnabledFeatures::videoRotateToFullscreenEnabled() && |
media_element.IsHTMLVideoElement()) { |
// Initialize the rotate-to-fullscreen feature. |
controls->rotate_to_fullscreen_delegate_ = |
new MediaControlsRotateToFullscreenDelegate( |
toHTMLVideoElement(media_element)); |
- } else if (RuntimeEnabledFeatures::videoFullscreenOrientationLockEnabled() && |
- media_element.IsHTMLVideoElement()) { |
- // Initialize the orientation lock when going fullscreen feature. |
- controls->orientation_lock_delegate_ = |
- new MediaControlsOrientationLockDelegate( |
- toHTMLVideoElement(media_element)); |
} |
shadow_root.AppendChild(controls); |