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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. | 100 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. |
101 // Note that not all mechanisms for terminating the process are covered by | 101 // Note that not all mechanisms for terminating the process are covered by |
102 // this. In particular, TerminateProcess() is not caught. | 102 // this. In particular, TerminateProcess() is not caught. |
103 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); | 103 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); |
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 | |
111 // integrated multi-touch ready to use and has Windows version > Windows7. | |
112 BASE_EXPORT bool IsTouchEnabledDevice(); | |
113 | |
114 // A tablet is a device that is touch enabled and also is being used | 110 // 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 | 111 // "like a tablet". This is used primarily for metrics in order to gain some |
116 // insight into how users use Chrome. | 112 // insight into how users use Chrome. |
117 BASE_EXPORT bool IsTabletDevice(); | 113 BASE_EXPORT bool IsTabletDevice(); |
118 | 114 |
119 // Get the size of a struct up to and including the specified member. | 115 // Get the size of a struct up to and including the specified member. |
120 // This is necessary to set compatible struct sizes for different versions | 116 // This is necessary to set compatible struct sizes for different versions |
121 // of certain Windows APIs (e.g. SystemParametersInfo). | 117 // of certain Windows APIs (e.g. SystemParametersInfo). |
122 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ | 118 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
123 offsetof(struct_name, member) + \ | 119 offsetof(struct_name, member) + \ |
(...skipping 11 matching lines...) Expand all Loading... |
135 BASE_EXPORT bool IsEnrolledToDomain(); | 131 BASE_EXPORT bool IsEnrolledToDomain(); |
136 | 132 |
137 // Used by tests to mock any wanted state. Call with |state| set to true to | 133 // Used by tests to mock any wanted state. Call with |state| set to true to |
138 // simulate being in a domain and false otherwise. | 134 // simulate being in a domain and false otherwise. |
139 BASE_EXPORT void SetDomainStateForTesting(bool state); | 135 BASE_EXPORT void SetDomainStateForTesting(bool state); |
140 | 136 |
141 } // namespace win | 137 } // namespace win |
142 } // namespace base | 138 } // namespace base |
143 | 139 |
144 #endif // BASE_WIN_WIN_UTIL_H_ | 140 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |