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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp

Issue 2890423003: [Media controls] Integrate rotate-to-fullscreen with orientation lock (Closed)
Patch Set: #undef atan2,fmod Created 3 years, 7 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: 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);

Powered by Google App Engine
This is Rietveld 408576698