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

Issue 1758823004: Screen.orientation lock API implementation for Windows8 and later. (Closed)

Created:
4 years, 9 months ago by aleksandar.stojiljkovic
Modified:
4 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-screen-orientation_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Screen.orientation lock API implementation for Windows8 and later. Enabled for Windows 8 and later. Properly eabled in Tablet mode only; locks and unlocks orientation in full screen and windowed mode. Tested on Windows8 Yoga 12 laptop only. BUG=423919, 400846 Committed: https://crrev.com/4f4b5efee23bcf51ccd96c23bd67cdc7bb1e07e2 Cr-Commit-Position: refs/heads/master@{#380893}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Review #4 and #5 fixes. Thanks @avi. #

Total comments: 1

Patch Set 3 : Runtime resolving of GetAutoRotationState and SetDisplayAutoRotationPreferences - not available in Windows7 user32.dll #

Total comments: 33

Patch Set 4 : Review #21 and #22 fixes. #

Patch Set 5 : Disable API in multi monitor case. #

Total comments: 8

Patch Set 6 : #32 & #33 review fixes - thanks @cpu #

Patch Set 7 : rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -0 lines) Patch
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
A content/browser/screen_orientation/screen_orientation_delegate_win.h View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A content/browser/screen_orientation/screen_orientation_delegate_win.cc View 1 2 3 4 5 1 chunk +133 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (14 generated)
aleksandar.stojiljkovic
4 years, 9 months ago (2016-03-02 18:30:39 UTC) #3
Avi (use Gerrit)
https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.h File content/browser/screen_orientation/screen_orientation_delegate_win.h (right): https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.h#newcode8 content/browser/screen_orientation/screen_orientation_delegate_win.h:8: #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_WIN_H_ Include guards have to be the first ...
4 years, 9 months ago (2016-03-02 19:25:12 UTC) #4
Avi (use Gerrit)
https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode33 content/browser/screen_orientation/screen_orientation_delegate_win.cc:33: || dm.dmDisplayOrientation == DMDO_180); Multiple-line if() blocks need {}. ...
4 years, 9 months ago (2016-03-02 19:28:20 UTC) #5
aleksandar.stojiljkovic
Patch set 2: Review #4 and #5 fixes. Thanks @avi. https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/1/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode33 ...
4 years, 9 months ago (2016-03-02 19:47:20 UTC) #6
Avi (use Gerrit)
So it LGTM re content. I don't know Windows, so I can't review that. Get ...
4 years, 9 months ago (2016-03-03 17:45:00 UTC) #8
Avi (use Gerrit)
+cpu as one of the windowsiest peeps I know
4 years, 9 months ago (2016-03-03 17:45:37 UTC) #10
aleksandar.stojiljkovic
https://codereview.chromium.org/1758823004/diff/20001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/20001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode94 content/browser/screen_orientation/screen_orientation_delegate_win.cc:94: && (autoRotationState == AR_ENABLED)); It might be better to ...
4 years, 9 months ago (2016-03-03 20:34:36 UTC) #11
aleksandar.stojiljkovic
On 2016/03/03 20:34:36, aleksandar.stojiljkovic wrote: > https://codereview.chromium.org/1758823004/diff/20001/content/browser/screen_orientation/screen_orientation_delegate_win.cc > File content/browser/screen_orientation/screen_orientation_delegate_win.cc > (right): > > https://codereview.chromium.org/1758823004/diff/20001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode94 ...
4 years, 9 months ago (2016-03-04 12:30:26 UTC) #12
davidben
(Removing myself from reviewers since it looks like Avi's got this from the content end ...
4 years, 9 months ago (2016-03-04 18:54:18 UTC) #13
Avi (use Gerrit)
On 2016/03/04 12:30:26, aleksandar.stojiljkovic wrote: > On 2016/03/03 20:34:36, aleksandar.stojiljkovic wrote: > > > https://codereview.chromium.org/1758823004/diff/20001/content/browser/screen_orientation/screen_orientation_delegate_win.cc ...
4 years, 9 months ago (2016-03-04 19:13:52 UTC) #14
aleksandar.stojiljkovic
> On 2016/03/04 19:13:52, Avi wrote: > This still lg for content, and you still ...
4 years, 9 months ago (2016-03-04 20:09:22 UTC) #16
sky
I'm not an owner in content. On Fri, Mar 4, 2016 at 12:09 PM, <aleksandar.stojiljkovic@intel.com> ...
4 years, 9 months ago (2016-03-04 21:30:36 UTC) #17
Ben Goodger (Google)
I am an OWNER in content but scottmg knows all the new cool win32 stuff ...
4 years, 9 months ago (2016-03-04 21:32:31 UTC) #19
Avi (use Gerrit)
On 2016/03/04 21:32:31, Ben Goodger (Google) wrote: > I am an OWNER in content but ...
4 years, 9 months ago (2016-03-04 23:22:32 UTC) #20
sky
https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode7 content/browser/screen_orientation/screen_orientation_delegate_win.cc:7: #include <windows.h> nit: newline between 7/8. https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode27 content/browser/screen_orientation/screen_orientation_delegate_win.cc:27: ORIENTATION_PREFERENCE ...
4 years, 9 months ago (2016-03-04 23:37:36 UTC) #21
mlamouri (slow - plz ping)
I've had a quick look. Will let sky@ review the Windows API usage and check ...
4 years, 9 months ago (2016-03-05 00:39:14 UTC) #22
aleksandar.stojiljkovic
Patchset 4: Review 22 and 23 fixes. Thanks @sky and @mlamouri https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): ...
4 years, 9 months ago (2016-03-06 10:34:16 UTC) #23
sky
https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode55 content/browser/screen_orientation/screen_orientation_delegate_win.cc:55: if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)) On 2016/03/06 10:34:15, aleksandar.stojiljkovic wrote: ...
4 years, 9 months ago (2016-03-07 16:20:30 UTC) #24
aleksandar.stojiljkovic
On 2016/03/07 16:20:30, sky wrote: > https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc > File content/browser/screen_orientation/screen_orientation_delegate_win.cc > (right): > Again, why ...
4 years, 9 months ago (2016-03-07 16:59:53 UTC) #25
aleksandar.stojiljkovic
On 2016/03/07 16:59:53, aleksandar.stojiljkovic wrote: > On 2016/03/07 16:20:30, sky wrote: > > > https://codereview.chromium.org/1758823004/diff/40001/content/browser/screen_orientation/screen_orientation_delegate_win.cc ...
4 years, 9 months ago (2016-03-07 17:30:42 UTC) #26
mlamouri (slow - plz ping)
On 2016/03/07 at 17:30:42, aleksandar.stojiljkovic wrote: > On 2016/03/07 16:59:53, aleksandar.stojiljkovic wrote: > > On ...
4 years, 9 months ago (2016-03-07 18:30:36 UTC) #27
sky
On Mon, Mar 7, 2016 at 8:59 AM, <aleksandar.stojiljkovic@intel.com> wrote: > On 2016/03/07 16:20:30, sky ...
4 years, 9 months ago (2016-03-07 18:53:57 UTC) #28
aleksandar.stojiljkovic
Patch set 5: Disable API in multi monitor case. On 2016/03/07 18:53:57, sky wrote: > ...
4 years, 9 months ago (2016-03-07 23:26:49 UTC) #29
aleksandar.stojiljkovic
On 2016/03/07 23:26:49, aleksandar.stojiljkovic wrote: > Patch set 5: Disable API in multi monitor case. ...
4 years, 9 months ago (2016-03-10 18:47:39 UTC) #30
sky
LGTM
4 years, 9 months ago (2016-03-10 20:43:05 UTC) #31
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1758823004/diff/80001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/80001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode39 content/browser/screen_orientation/screen_orientation_delegate_win.cc:39: DEVMODE dm; dm = {}; zeroes it out nicer. ...
4 years, 9 months ago (2016-03-11 02:08:17 UTC) #32
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1758823004/diff/80001/content/browser/screen_orientation/screen_orientation_delegate_win.cc File content/browser/screen_orientation/screen_orientation_delegate_win.cc (right): https://codereview.chromium.org/1758823004/diff/80001/content/browser/screen_orientation/screen_orientation_delegate_win.cc#newcode118 content/browser/screen_orientation/screen_orientation_delegate_win.cc:118: AR_STATE auto_rotation_state; same here = {}
4 years, 9 months ago (2016-03-11 02:09:36 UTC) #33
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1758823004/diff/80001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/1758823004/diff/80001/content/browser/browser_main_loop.cc#newcode600 content/browser/browser_main_loop.cc:600: screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); can this be later? like in PostMainMessageLoopStart?
4 years, 9 months ago (2016-03-11 02:12:01 UTC) #34
aleksandar.stojiljkovic
Patch set 6:#32 & #33 review fixes - thanks @cpu https://codereview.chromium.org/1758823004/diff/80001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/1758823004/diff/80001/content/browser/browser_main_loop.cc#newcode600 ...
4 years, 9 months ago (2016-03-11 19:29:26 UTC) #35
cpu_(ooo_6.6-7.5)
lgtm
4 years, 9 months ago (2016-03-11 20:56:43 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1758823004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1758823004/100001
4 years, 9 months ago (2016-03-12 07:51:52 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/3920) ios_dbg_simulator_ninja on ...
4 years, 9 months ago (2016-03-12 07:53:44 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1758823004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1758823004/120001
4 years, 9 months ago (2016-03-12 20:42:38 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-13 01:57:05 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1758823004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1758823004/120001
4 years, 9 months ago (2016-03-13 07:14:57 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 9 months ago (2016-03-13 07:20:15 UTC) #49
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/4f4b5efee23bcf51ccd96c23bd67cdc7bb1e07e2 Cr-Commit-Position: refs/heads/master@{#380893}
4 years, 9 months ago (2016-03-13 07:21:31 UTC) #51
aleksandar.stojiljkovic
3 years, 9 months ago (2017-03-21 10:45:25 UTC) #52
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/2761213003/ by
aleksandar.stojiljkovic@intel.com.

The reason for reverting is: Random behavior on different Windows tablets.
Probable cause of Issue 702435.
Needs to be debugged - it works on some hardware and somewhere it doesn't, we
need to evaluate if it makes sense to take the risk with this one.





.

Powered by Google App Engine
This is Rietveld 408576698