| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 string16* command); | 99 string16* command); |
| 100 | 100 |
| 101 // Sets whether to crash the process during exit. This is inspected by DLLMain | 101 // Sets whether to crash the process during exit. This is inspected by DLLMain |
| 102 // and used to intercept unexpected terminations of the process (via calls to | 102 // and used to intercept unexpected terminations of the process (via calls to |
| 103 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. | 103 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. |
| 104 // Note that not all mechanisms for terminating the process are covered by | 104 // Note that not all mechanisms for terminating the process are covered by |
| 105 // this. In particular, TerminateProcess() is not caught. | 105 // this. In particular, TerminateProcess() is not caught. |
| 106 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); | 106 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); |
| 107 BASE_EXPORT bool ShouldCrashOnProcessDetach(); | 107 BASE_EXPORT bool ShouldCrashOnProcessDetach(); |
| 108 | 108 |
| 109 // Adjusts the abort behavior so that crash reports can be generated when the |
| 110 // process is aborted. |
| 111 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); |
| 112 |
| 109 // A tablet by this definition is something that has integrated multi-touch | 113 // A tablet by this definition is something that has integrated multi-touch |
| 110 // ready to use and also has screen resolution not greater than 1366x768. | 114 // ready to use and also has screen resolution not greater than 1366x768. |
| 111 BASE_EXPORT bool IsMachineATablet(); | 115 BASE_EXPORT bool IsMachineATablet(); |
| 112 | 116 |
| 113 // Get the size of a struct up to and including the specified member. | 117 // Get the size of a struct up to and including the specified member. |
| 114 // This is necessary to set compatible struct sizes for different versions | 118 // This is necessary to set compatible struct sizes for different versions |
| 115 // of certain Windows APIs (e.g. SystemParametersInfo). | 119 // of certain Windows APIs (e.g. SystemParametersInfo). |
| 116 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ | 120 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
| 117 offsetof(struct_name, member) + \ | 121 offsetof(struct_name, member) + \ |
| 118 (sizeof static_cast<struct_name*>(NULL)->member) | 122 (sizeof static_cast<struct_name*>(NULL)->member) |
| 119 | 123 |
| 120 } // namespace win | 124 } // namespace win |
| 121 } // namespace base | 125 } // namespace base |
| 122 | 126 |
| 123 #endif // BASE_WIN_WIN_UTIL_H_ | 127 #endif // BASE_WIN_WIN_UTIL_H_ |
| OLD | NEW |