OLD | NEW |
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Adjusts the abort behavior so that crash reports can be generated when the | 126 // Adjusts the abort behavior so that crash reports can be generated when the |
127 // process is aborted. | 127 // process is aborted. |
128 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); | 128 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); |
129 | 129 |
130 // A tablet is a device that is touch enabled and also is being used | 130 // A tablet is a device that is touch enabled and also is being used |
131 // "like a tablet". This is used primarily for metrics in order to gain some | 131 // "like a tablet". This is used primarily for metrics in order to gain some |
132 // insight into how users use Chrome. | 132 // insight into how users use Chrome. |
133 BASE_EXPORT bool IsTabletDevice(); | 133 BASE_EXPORT bool IsTabletDevice(); |
134 | 134 |
| 135 // A slate is a touch device that may have a keyboard attached. This function |
| 136 // returns true if a keyboard is attached and optionally will set the reason |
| 137 // parameter to the detection method that was used to detect the keyboard. |
| 138 BASE_EXPORT bool IsKeyboardPresentOnSlate(std::string* reason); |
| 139 |
135 // Get the size of a struct up to and including the specified member. | 140 // Get the size of a struct up to and including the specified member. |
136 // This is necessary to set compatible struct sizes for different versions | 141 // This is necessary to set compatible struct sizes for different versions |
137 // of certain Windows APIs (e.g. SystemParametersInfo). | 142 // of certain Windows APIs (e.g. SystemParametersInfo). |
138 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ | 143 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
139 offsetof(struct_name, member) + \ | 144 offsetof(struct_name, member) + \ |
140 (sizeof static_cast<struct_name*>(NULL)->member) | 145 (sizeof static_cast<struct_name*>(NULL)->member) |
141 | 146 |
142 // Displays the on screen keyboard on Windows 8 and above. Returns true on | 147 // Displays the on screen keyboard on Windows 8 and above. Returns true on |
143 // success. | 148 // success. |
144 BASE_EXPORT bool DisplayVirtualKeyboard(); | 149 BASE_EXPORT bool DisplayVirtualKeyboard(); |
(...skipping 13 matching lines...) Expand all Loading... |
158 // certificates. As its name indicates, this function provides a best-effort | 163 // certificates. As its name indicates, this function provides a best-effort |
159 // answer, which is solely based on comparing version numbers. The function | 164 // answer, which is solely based on comparing version numbers. The function |
160 // may be re-implemented in the future to return a reliable value, based on | 165 // may be re-implemented in the future to return a reliable value, based on |
161 // run-time detection of this capability. | 166 // run-time detection of this capability. |
162 BASE_EXPORT bool MaybeHasSHA256Support(); | 167 BASE_EXPORT bool MaybeHasSHA256Support(); |
163 | 168 |
164 } // namespace win | 169 } // namespace win |
165 } // namespace base | 170 } // namespace base |
166 | 171 |
167 #endif // BASE_WIN_WIN_UTIL_H_ | 172 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |