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

Issue 2890423003: [Media controls] Integrate rotate-to-fullscreen with orientation lock (Closed)

Created:
3 years, 7 months ago by johnme
Modified:
3 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, blink-reviews, chromium-reviews, darin (slow to review), haraken, mlamouri+watch-screen-orientation_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media controls] Integrate rotate-to-fullscreen with orientation lock Until now, enabling the video-rotate-to-fullscreen feature required disabling the video-fullscreen-orientation-lock feature. This patch makes MediaControlsOrientationLockDelegate aware of MediaControlsRotateToFullscreenDelegate, specifically when both are enabled and the user hasn't locked their screen orientation it will only lock the screen orientation until the user rotates their device to match the orientation of the video (whereas previously it would hold the lock until the video stopped being fullscreen). Thus the user will be able to exit fullscreen by rotating their device back to the opposite orientation. The reason this only happens if the user hasn't locked their screen orientation at the OS level is to make it possible to watch videos whilst lying in bed with your head at 90 degrees to the usual up direction. To help visualize the maths behind the orientation calculations, I wrote https://jsbin.com/sobopem and https://jsbin.com/rijakaf (view them on a phone or tablet). BUG=713225 Review-Url: https://codereview.chromium.org/2890423003 Cr-Commit-Position: refs/heads/master@{#474632} Committed: https://chromium.googlesource.com/chromium/src/+/0dfadaecdbd95a4babb5b05a3fc50441b0aba845

Patch Set 1 #

Patch Set 2 : Fix existing tests #

Total comments: 2

Patch Set 3 : Fix tests and add underscore #

Patch Set 4 : Fix gn deps #

Patch Set 5 : Rebase #

Patch Set 6 : #undef atan2,fmod #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -48 lines) Patch
M device/screen_orientation/public/interfaces/screen_orientation.mojom View 1 chunk +6 lines, -0 lines 0 comments Download
M services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java View 2 chunks +10 lines, -0 lines 0 comments Download
M services/device/screen_orientation/screen_orientation_listener_android.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M services/device/screen_orientation/screen_orientation_listener_android.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/BUILD.gn View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/DEPS View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp View 1 chunk +7 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.h View 4 chunks +26 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp View 1 2 3 4 5 5 chunks +180 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp View 1 2 14 chunks +39 lines, -22 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (15 generated)
johnme
3 years, 7 months ago (2017-05-19 20:39:24 UTC) #2
mlamouri (slow - plz ping)
lgtm https://codereview.chromium.org/2890423003/diff/20001/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp File third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp (right): https://codereview.chromium.org/2890423003/diff/20001/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp#newcode74 third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp:74: FakeWebScreenOrientationClient web_screen_orientation_client; style: you are missing a _
3 years, 7 months ago (2017-05-24 17:03:41 UTC) #3
johnme
+palmer: please approve device/screen_orientation/public/interfaces/screen_orientation.mojom - thanks!
3 years, 7 months ago (2017-05-24 17:07:37 UTC) #5
johnme
https://codereview.chromium.org/2890423003/diff/20001/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp File third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp (right): https://codereview.chromium.org/2890423003/diff/20001/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp#newcode74 third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp:74: FakeWebScreenOrientationClient web_screen_orientation_client; On 2017/05/24 17:03:41, mlamouri (OOO up to ...
3 years, 7 months ago (2017-05-24 17:17:42 UTC) #6
palmer
lgtm
3 years, 7 months ago (2017-05-24 18:18:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890423003/40001
3 years, 7 months ago (2017-05-24 18:34:08 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/276794) android_cronet on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-24 18:39:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890423003/60001
3 years, 7 months ago (2017-05-24 18:52:37 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/275232)
3 years, 7 months ago (2017-05-24 19:15:56 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890423003/80001
3 years, 7 months ago (2017-05-25 00:46:55 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/419566) win_clang on master.tryserver.chromium.win (JOB_FAILED, ...
3 years, 7 months ago (2017-05-25 01:39:23 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890423003/100001
3 years, 7 months ago (2017-05-25 10:19:11 UTC) #25
commit-bot: I haz the power
3 years, 7 months ago (2017-05-25 12:40:39 UTC) #28
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/0dfadaecdbd95a4babb5b05a3fc5...

Powered by Google App Engine
This is Rietveld 408576698