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

Issue 1783123003: Improve tablet mode detection on Windows 10+ (Closed)

Created:
4 years, 9 months ago by ananta
Modified:
4 years, 9 months ago
Reviewers:
jschuh
CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve tablet mode detection on Windows 10+ This patch introduces the following:- 1. A function IsWindows10TabletMode which uses the new WRL API's on Windows 10 to query the current interaction mode. As per msdn these API's can be called from Win32 apps. https://msdn.microsoft.com/en-us/library/windows/hardware/dn917883(v=vs.85).aspx https://software.intel.com/en-us/articles/detecting-slateclamshell-mode-screen-orientation-in-convertible-pc These API's however appear to always return UserModeTouch which indicates tablet mode on the Surface 4 configuration I was testing with. 2. If the IsTabletDevice function returns true we don't attempt to detect keyboards and just assume that there is no keyboard attached. BUG=497381 Committed: https://crrev.com/d67aae27c1137d077f228d27cae2337d2b8caefa Cr-Commit-Position: refs/heads/master@{#380864}

Patch Set 1 #

Patch Set 2 : Fix 64 bit build error #

Total comments: 15

Patch Set 3 : Use the Windows 10 sdk includes #

Total comments: 4

Patch Set 4 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -3 lines) Patch
M base/win/win_util.cc View 1 2 3 7 chunks +91 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (3 generated)
ananta
4 years, 9 months ago (2016-03-11 01:43:25 UTC) #2
jschuh
https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc File base/win/win_util.cc (right): https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc#newcode116 base/win/win_util.cc:116: // These definitions need to be removed once we ...
4 years, 9 months ago (2016-03-11 22:01:45 UTC) #3
Will Harris
drive by from the peanut gallery https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc File base/win/win_util.cc (right): https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc#newcode116 base/win/win_util.cc:116: // These definitions ...
4 years, 9 months ago (2016-03-11 22:05:06 UTC) #4
ananta
https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc File base/win/win_util.cc (right): https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc#newcode116 base/win/win_util.cc:116: // These definitions need to be removed once we ...
4 years, 9 months ago (2016-03-11 23:14:15 UTC) #5
jschuh
One meta question: do we have any way at all to test this? https://codereview.chromium.org/1783123003/diff/20001/base/win/win_util.cc File ...
4 years, 9 months ago (2016-03-11 23:50:26 UTC) #6
ananta
Currently there is no way to test this functionality. I think we need to seriously ...
4 years, 9 months ago (2016-03-12 00:27:59 UTC) #7
jschuh
lgtm
4 years, 9 months ago (2016-03-12 00:37:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1783123003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1783123003/60001
4 years, 9 months ago (2016-03-12 01:06:47 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 9 months ago (2016-03-12 04:58:07 UTC) #11
commit-bot: I haz the power
4 years, 9 months ago (2016-03-12 04:59:12 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d67aae27c1137d077f228d27cae2337d2b8caefa
Cr-Commit-Position: refs/heads/master@{#380864}

Powered by Google App Engine
This is Rietveld 408576698