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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "win8/delegate_execute/chrome_util.h" 5 #include "win8/delegate_execute/chrome_util.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 string16 app_id(kAppUserModelId); 257 string16 app_id(kAppUserModelId);
258 string16 suffix; 258 string16 suffix;
259 if (IsPerUserInstall(chrome_exe) && 259 if (IsPerUserInstall(chrome_exe) &&
260 !GetUserSpecificRegistrySuffix(&suffix)) { 260 !GetUserSpecificRegistrySuffix(&suffix)) {
261 AtlTrace("%hs. GetUserSpecificRegistrySuffix failed.\n", 261 AtlTrace("%hs. GetUserSpecificRegistrySuffix failed.\n",
262 __FUNCTION__); 262 __FUNCTION__);
263 } 263 }
264 return app_id.append(suffix); 264 return app_id.append(suffix);
265 } 265 }
266 266
267 bool IsMachineATablet() {
268 // A tablet by this definition is something that has integrated multi-touch
269 // but is not also pen-enabled. For example a Thinkpad X220 tablet is not
270 // considered a tabled while a Samsum 700T tablet is.
271 const int kPenInput = NID_INTEGRATED_PEN | NID_EXTERNAL_PEN;
272 const int kMultiTouch = NID_INTEGRATED_TOUCH | NID_MULTI_INPUT | NID_READY;
273 int sm = GetSystemMetrics(SM_DIGITIZER);
274 AtlTrace("GetSystemMetrics for SM_DIGITIZER is 0x%x\n", sm);
275 return ((sm & kMultiTouch) == kMultiTouch) && ((sm & kPenInput) == 0);
276 }
277
267 } // delegate_execute 278 } // delegate_execute
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698