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

Side by Side Diff: base/win/win_util.h

Issue 262773015: Add an UMA metric to track whether chrome is running on a tablet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review issues. Created 6 years, 7 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
« no previous file with comments | « base/base.gyp ('k') | base/win/win_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // ============================================================================= 5 // =============================================================================
6 // PLEASE READ 6 // PLEASE READ
7 // 7 //
8 // In general, you should not be adding stuff to this file. 8 // In general, you should not be adding stuff to this file.
9 // 9 //
10 // - If your thing is only used in one place, just put it in a reasonable 10 // - If your thing is only used in one place, just put it in a reasonable
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 BASE_EXPORT bool ShouldCrashOnProcessDetach(); 104 BASE_EXPORT bool ShouldCrashOnProcessDetach();
105 105
106 // Adjusts the abort behavior so that crash reports can be generated when the 106 // Adjusts the abort behavior so that crash reports can be generated when the
107 // process is aborted. 107 // process is aborted.
108 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); 108 BASE_EXPORT void SetAbortBehaviorForCrashReporting();
109 109
110 // A touch enabled device by this definition is something that has 110 // A touch enabled device by this definition is something that has
111 // integrated multi-touch ready to use and has Windows version > Windows7. 111 // integrated multi-touch ready to use and has Windows version > Windows7.
112 BASE_EXPORT bool IsTouchEnabledDevice(); 112 BASE_EXPORT bool IsTouchEnabledDevice();
113 113
114 // A tablet is a device that is touch enabled and also is being used
115 // "like a tablet". This is used primarily for metrics in order to gain some
116 // insight into how users use Chrome.
117 BASE_EXPORT bool IsTabletDevice();
118
114 // Get the size of a struct up to and including the specified member. 119 // Get the size of a struct up to and including the specified member.
115 // This is necessary to set compatible struct sizes for different versions 120 // This is necessary to set compatible struct sizes for different versions
116 // of certain Windows APIs (e.g. SystemParametersInfo). 121 // of certain Windows APIs (e.g. SystemParametersInfo).
117 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ 122 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \
118 offsetof(struct_name, member) + \ 123 offsetof(struct_name, member) + \
119 (sizeof static_cast<struct_name*>(NULL)->member) 124 (sizeof static_cast<struct_name*>(NULL)->member)
120 125
121 // Displays the on screen keyboard on Windows 8 and above. Returns true on 126 // Displays the on screen keyboard on Windows 8 and above. Returns true on
122 // success. 127 // success.
123 BASE_EXPORT bool DisplayVirtualKeyboard(); 128 BASE_EXPORT bool DisplayVirtualKeyboard();
124 129
125 // Dismisses the on screen keyboard if it is being displayed on Windows 8 and. 130 // Dismisses the on screen keyboard if it is being displayed on Windows 8 and.
126 // above. Returns true on success. 131 // above. Returns true on success.
127 BASE_EXPORT bool DismissVirtualKeyboard(); 132 BASE_EXPORT bool DismissVirtualKeyboard();
128 133
129 // Returns true if the machine is enrolled to a domain. 134 // Returns true if the machine is enrolled to a domain.
130 BASE_EXPORT bool IsEnrolledToDomain(); 135 BASE_EXPORT bool IsEnrolledToDomain();
131 136
132 // Used by tests to mock any wanted state. Call with |state| set to true to 137 // Used by tests to mock any wanted state. Call with |state| set to true to
133 // simulate being in a domain and false otherwise. 138 // simulate being in a domain and false otherwise.
134 BASE_EXPORT void SetDomainStateForTesting(bool state); 139 BASE_EXPORT void SetDomainStateForTesting(bool state);
135 140
136 } // namespace win 141 } // namespace win
137 } // namespace base 142 } // namespace base
138 143
139 #endif // BASE_WIN_WIN_UTIL_H_ 144 #endif // BASE_WIN_WIN_UTIL_H_
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | base/win/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698