| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef BASE_WIN_UTIL_H__ | 5 #ifndef BASE_WIN_UTIL_H__ |
| 6 #define BASE_WIN_UTIL_H__ | 6 #define BASE_WIN_UTIL_H__ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <aclapi.h> | 9 #include <aclapi.h> |
| 10 #include <shlobj.h> |
| 10 | 11 |
| 11 #include <string> | 12 #include <string> |
| 12 | 13 |
| 13 #include "base/keyboard_codes.h" | 14 #include "base/keyboard_codes.h" |
| 14 | 15 |
| 15 namespace win_util { | 16 namespace win_util { |
| 16 | 17 |
| 17 // NOTE: Keep these in order so callers can do things like | 18 // NOTE: Keep these in order so callers can do things like |
| 18 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, | 19 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, |
| 19 // though. | 20 // though. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Windows's default Message Compiled resources; ignoring the inserts. | 104 // Windows's default Message Compiled resources; ignoring the inserts. |
| 104 std::wstring FormatMessage(unsigned messageid); | 105 std::wstring FormatMessage(unsigned messageid); |
| 105 | 106 |
| 106 // Uses the last Win32 error to generate a human readable message string. | 107 // Uses the last Win32 error to generate a human readable message string. |
| 107 std::wstring FormatLastWin32Error(); | 108 std::wstring FormatLastWin32Error(); |
| 108 | 109 |
| 109 // Methods to convert base::KeyboardCode/Windows virtual key type methods. | 110 // Methods to convert base::KeyboardCode/Windows virtual key type methods. |
| 110 WORD KeyboardCodeToWin(base::KeyboardCode keycode); | 111 WORD KeyboardCodeToWin(base::KeyboardCode keycode); |
| 111 base::KeyboardCode WinToKeyboardCode(WORD keycode); | 112 base::KeyboardCode WinToKeyboardCode(WORD keycode); |
| 112 | 113 |
| 114 // Sets the application id in given IPropertyStore. The function is intended |
| 115 // for tagging application/chromium shortcut, browser window and jump list for |
| 116 // Win7. |
| 117 bool SetAppIdForPropertyStore(IPropertyStore* property_store, |
| 118 const wchar_t* app_id); |
| 119 |
| 113 } // namespace win_util | 120 } // namespace win_util |
| 114 | 121 |
| 115 #endif // BASE_WIN_UTIL_H__ | 122 #endif // BASE_WIN_UTIL_H__ |
| OLD | NEW |