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

Unified Diff: win8/delegate_execute/chrome_util.cc

Issue 10928172: Implement the persistent metro mode setting (win8) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: win8/delegate_execute/chrome_util.cc
===================================================================
--- win8/delegate_execute/chrome_util.cc (revision 156164)
+++ win8/delegate_execute/chrome_util.cc (working copy)
@@ -264,4 +264,15 @@
return app_id.append(suffix);
}
+bool IsMachineATablet() {
+ // A tablet by this definition is something that has integrated multi-touch
+ // but is not also pen-enabled. For example a Thinkpad X220 tablet is not
+ // considered a tabled while a Samsum 700T tablet is.
+ const int kPenInput = NID_INTEGRATED_PEN | NID_EXTERNAL_PEN;
+ const int kMultiTouch = NID_INTEGRATED_TOUCH | NID_MULTI_INPUT | NID_READY;
+ int sm = GetSystemMetrics(SM_DIGITIZER);
+ AtlTrace("GetSystemMetrics for SM_DIGITIZER is 0x%x\n", sm);
+ return ((sm & kMultiTouch) == kMultiTouch) && ((sm & kPenInput) == 0);
+}
+
} // delegate_execute

Powered by Google App Engine
This is Rietveld 408576698