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

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

Issue 1838993002: Export the tablet mode checking function from base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. 116 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes.
117 // Note that not all mechanisms for terminating the process are covered by 117 // Note that not all mechanisms for terminating the process are covered by
118 // this. In particular, TerminateProcess() is not caught. 118 // this. In particular, TerminateProcess() is not caught.
119 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); 119 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash);
120 BASE_EXPORT bool ShouldCrashOnProcessDetach(); 120 BASE_EXPORT bool ShouldCrashOnProcessDetach();
121 121
122 // Adjusts the abort behavior so that crash reports can be generated when the 122 // Adjusts the abort behavior so that crash reports can be generated when the
123 // process is aborted. 123 // process is aborted.
124 BASE_EXPORT void SetAbortBehaviorForCrashReporting(); 124 BASE_EXPORT void SetAbortBehaviorForCrashReporting();
125 125
126 // Checks whether the supplied |hwnd| is in Windows 10 tablet mode. Will return
127 // false on versions below 10.
128 BASE_EXPORT bool IsWindows10TabletMode(HWND hwnd);
129
126 // 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
127 // "like a tablet". This is used by the following:- 131 // "like a tablet". This is used by the following:-
128 // 1. Metrics:- To gain insight into how users use Chrome. 132 // 1. Metrics:- To gain insight into how users use Chrome.
129 // 2. Physical keyboard presence :- If a device is in tablet mode, it means 133 // 2. Physical keyboard presence :- If a device is in tablet mode, it means
130 // that there is no physical keyboard attached. 134 // that there is no physical keyboard attached.
131 // This function optionally sets the |reason| parameter to determine as to why 135 // This function optionally sets the |reason| parameter to determine as to why
132 // or why not a device was deemed to be a tablet. 136 // or why not a device was deemed to be a tablet.
133 // Returns true if the device is in tablet mode. 137 // Returns true if the device is in tablet mode.
134 BASE_EXPORT bool IsTabletDevice(std::string* reason); 138 BASE_EXPORT bool IsTabletDevice(std::string* reason);
135 139
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // HMODULEs are not add-ref'd, so they should not be closed and may be 175 // HMODULEs are not add-ref'd, so they should not be closed and may be
172 // invalidated at any time (should a module be unloaded). |process| requires 176 // invalidated at any time (should a module be unloaded). |process| requires
173 // the PROCESS_QUERY_INFORMATION and PROCESS_VM_READ permissions. 177 // the PROCESS_QUERY_INFORMATION and PROCESS_VM_READ permissions.
174 BASE_EXPORT bool GetLoadedModulesSnapshot(HANDLE process, 178 BASE_EXPORT bool GetLoadedModulesSnapshot(HANDLE process,
175 std::vector<HMODULE>* snapshot); 179 std::vector<HMODULE>* snapshot);
176 180
177 } // namespace win 181 } // namespace win
178 } // namespace base 182 } // namespace base
179 183
180 #endif // BASE_WIN_WIN_UTIL_H_ 184 #endif // BASE_WIN_WIN_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/win/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698