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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 IPropertyStore* property_store, | 71 IPropertyStore* property_store, |
72 const PROPERTYKEY& property_key, | 72 const PROPERTYKEY& property_key, |
73 const wchar_t* property_string_value); | 73 const wchar_t* property_string_value); |
74 | 74 |
75 // Sets the application id in given IPropertyStore. The function is intended | 75 // Sets the application id in given IPropertyStore. The function is intended |
76 // for tagging application/chromium shortcut, browser window and jump list for | 76 // for tagging application/chromium shortcut, browser window and jump list for |
77 // Win7. | 77 // Win7. |
78 BASE_EXPORT bool SetAppIdForPropertyStore(IPropertyStore* property_store, | 78 BASE_EXPORT bool SetAppIdForPropertyStore(IPropertyStore* property_store, |
79 const wchar_t* app_id); | 79 const wchar_t* app_id); |
80 | 80 |
81 // Sets the DualModeApp property to true in |property_store|. The function is | 81 // Sets the DualModeApp property to |is_dual_mode| in |property_store|. This |
82 // intended for tagging dual mode applications in Win8. | 82 // method is intended for tagging dual mode applications in Win8+. |
83 BASE_EXPORT bool SetDualModeForPropertyStore(IPropertyStore* property_store); | 83 BASE_EXPORT bool SetDualModeForPropertyStore(IPropertyStore* property_store, |
| 84 bool is_dual_mode); |
84 | 85 |
85 // Adds the specified |command| using the specified |name| to the AutoRun key. | 86 // Adds the specified |command| using the specified |name| to the AutoRun key. |
86 // |root_key| could be HKCU or HKLM or the root of any user hive. | 87 // |root_key| could be HKCU or HKLM or the root of any user hive. |
87 BASE_EXPORT bool AddCommandToAutoRun(HKEY root_key, const string16& name, | 88 BASE_EXPORT bool AddCommandToAutoRun(HKEY root_key, const string16& name, |
88 const string16& command); | 89 const string16& command); |
89 // Removes the command specified by |name| from the AutoRun key. |root_key| | 90 // Removes the command specified by |name| from the AutoRun key. |root_key| |
90 // could be HKCU or HKLM or the root of any user hive. | 91 // could be HKCU or HKLM or the root of any user hive. |
91 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); | 92 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); |
92 | 93 |
93 // Reads the command specified by |name| from the AutoRun key. |root_key| | 94 // Reads the command specified by |name| from the AutoRun key. |root_key| |
(...skipping 14 matching lines...) Expand all Loading... |
108 // This is necessary to set compatible struct sizes for different versions | 109 // This is necessary to set compatible struct sizes for different versions |
109 // of certain Windows APIs (e.g. SystemParametersInfo). | 110 // of certain Windows APIs (e.g. SystemParametersInfo). |
110 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ | 111 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
111 offsetof(struct_name, member) + \ | 112 offsetof(struct_name, member) + \ |
112 (sizeof static_cast<struct_name*>(NULL)->member) | 113 (sizeof static_cast<struct_name*>(NULL)->member) |
113 | 114 |
114 } // namespace win | 115 } // namespace win |
115 } // namespace base | 116 } // namespace base |
116 | 117 |
117 #endif // BASE_WIN_WIN_UTIL_H_ | 118 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |