OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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. |
darin (slow to review)
2011/08/31 05:52:01
this seems like appropriate advice in this case.
Yaron
2011/08/31 23:23:22
This was based on feedback in the original review
| |
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 |
11 // location in or near that one place. It's nice you want people to be able | 11 // location in or near that one place. It's nice you want people to be able |
12 // to re-use your function, but realistically, if it hasn't been necessary | 12 // to re-use your function, but realistically, if it hasn't been necessary |
13 // before after so many years of development, it's probably not going to be | 13 // before after so many years of development, it's probably not going to be |
14 // used in other places in the future unless you know of them now. | 14 // used in other places in the future unless you know of them now. |
15 // | 15 // |
16 // - If your thing is used by multiple callers and is UI-related, it should | 16 // - If your thing is used by multiple callers and is UI-related, it should |
17 // probably be in app/win/ instead. Try to put it in the most specific file | 17 // probably be in app/win/ instead. Try to put it in the most specific file |
18 // possible (avoiding the *_util files when practical). | 18 // possible (avoiding the *_util files when practical). |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
52 | 52 |
53 // Returns true if the shift key is currently pressed. | 53 // Returns true if the shift key is currently pressed. |
54 BASE_EXPORT bool IsShiftPressed(); | 54 BASE_EXPORT bool IsShiftPressed(); |
55 | 55 |
56 // Returns true if the ctrl key is currently pressed. | 56 // Returns true if the ctrl key is currently pressed. |
57 BASE_EXPORT bool IsCtrlPressed(); | 57 BASE_EXPORT bool IsCtrlPressed(); |
58 | 58 |
59 // Returns true if the alt key is currently pressed. | 59 // Returns true if the alt key is currently pressed. |
60 BASE_EXPORT bool IsAltPressed(); | 60 BASE_EXPORT bool IsAltPressed(); |
61 | 61 |
62 // Returns the computer name or the empty string an error occurred. | |
63 BASE_EXPORT std::string GetComputerName(); | |
64 | |
62 // Returns false if user account control (UAC) has been disabled with the | 65 // Returns false if user account control (UAC) has been disabled with the |
63 // EnableLUA registry flag. Returns true if user account control is enabled. | 66 // EnableLUA registry flag. Returns true if user account control is enabled. |
64 // NOTE: The EnableLUA registry flag, which is ignored on Windows XP | 67 // NOTE: The EnableLUA registry flag, which is ignored on Windows XP |
65 // machines, might still exist and be set to 0 (UAC disabled), in which case | 68 // machines, might still exist and be set to 0 (UAC disabled), in which case |
66 // this function will return false. You should therefore check this flag only | 69 // this function will return false. You should therefore check this flag only |
67 // if the OS is Vista or later. | 70 // if the OS is Vista or later. |
68 BASE_EXPORT bool UserAccountControlIsEnabled(); | 71 BASE_EXPORT bool UserAccountControlIsEnabled(); |
69 | 72 |
70 // Sets the application id in given IPropertyStore. The function is intended | 73 // Sets the application id in given IPropertyStore. The function is intended |
71 // for tagging application/chromium shortcut, browser window and jump list for | 74 // for tagging application/chromium shortcut, browser window and jump list for |
(...skipping 12 matching lines...) Expand all Loading... | |
84 // Reads the command specified by |name| from the AutoRun key. |root_key| | 87 // Reads the command specified by |name| from the AutoRun key. |root_key| |
85 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. | 88 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. |
86 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, | 89 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, |
87 const string16& name, | 90 const string16& name, |
88 string16* command); | 91 string16* command); |
89 | 92 |
90 } // namespace win | 93 } // namespace win |
91 } // namespace base | 94 } // namespace base |
92 | 95 |
93 #endif // BASE_WIN_WIN_UTIL_H_ | 96 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |