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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Note that not all mechanisms for terminating the process are covered by | 115 // Note that not all mechanisms for terminating the process are covered by |
116 // this. In particular, TerminateProcess() is not caught. | 116 // this. In particular, TerminateProcess() is not caught. |
117 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); | 117 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); |
118 BASE_EXPORT bool ShouldCrashOnProcessDetach(); | 118 BASE_EXPORT bool ShouldCrashOnProcessDetach(); |
119 | 119 |
120 // Adjusts the abort behavior so that crash reports can be generated when the | 120 // Adjusts the abort behavior so that crash reports can be generated when the |
121 // process is aborted. | 121 // process is aborted. |
122 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); | 122 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); |
123 | 123 |
124 // A tablet is a device that is touch enabled and also is being used | 124 // A tablet is a device that is touch enabled and also is being used |
125 // "like a tablet". This is used primarily for metrics in order to gain some | 125 // "like a tablet". This is used by the following:- |
126 // insight into how users use Chrome. | 126 // 1. Metrics:- To gain insight into how users use Chrome. |
127 BASE_EXPORT bool IsTabletDevice(); | 127 // 2. Physical keyboard presence :- If a device is in tablet mode, it means |
| 128 // that there is no physical keyboard attached. |
| 129 // This function optionally sets the |reason| parameter to determine as to why |
| 130 // or why not a device was deemed to be a tablet. |
| 131 // Returns true if the device is in tablet mode. |
| 132 BASE_EXPORT bool IsTabletDevice(std::string* reason); |
128 | 133 |
129 // A slate is a touch device that may have a keyboard attached. This function | 134 // A slate is a touch device that may have a keyboard attached. This function |
130 // returns true if a keyboard is attached and optionally will set the reason | 135 // returns true if a keyboard is attached and optionally will set the reason |
131 // parameter to the detection method that was used to detect the keyboard. | 136 // parameter to the detection method that was used to detect the keyboard. |
132 BASE_EXPORT bool IsKeyboardPresentOnSlate(std::string* reason); | 137 BASE_EXPORT bool IsKeyboardPresentOnSlate(std::string* reason); |
133 | 138 |
134 // Get the size of a struct up to and including the specified member. | 139 // Get the size of a struct up to and including the specified member. |
135 // This is necessary to set compatible struct sizes for different versions | 140 // This is necessary to set compatible struct sizes for different versions |
136 // of certain Windows APIs (e.g. SystemParametersInfo). | 141 // of certain Windows APIs (e.g. SystemParametersInfo). |
137 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ | 142 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
(...skipping 26 matching lines...) Expand all Loading... |
164 // CreateWindow and CreateDC. Windows 8 and above allow the kernel component | 169 // CreateWindow and CreateDC. Windows 8 and above allow the kernel component |
165 // of these calls to be disabled which can cause undefined behaviour such as | 170 // of these calls to be disabled which can cause undefined behaviour such as |
166 // crashes. This function can be used to guard areas of code using these calls | 171 // crashes. This function can be used to guard areas of code using these calls |
167 // and provide a fallback path if necessary. | 172 // and provide a fallback path if necessary. |
168 BASE_EXPORT bool IsUser32AndGdi32Available(); | 173 BASE_EXPORT bool IsUser32AndGdi32Available(); |
169 | 174 |
170 } // namespace win | 175 } // namespace win |
171 } // namespace base | 176 } // namespace base |
172 | 177 |
173 #endif // BASE_WIN_WIN_UTIL_H_ | 178 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |