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

Side by Side Diff: chrome/installer/util/shell_util.h

Issue 1573243010: Follow up to https://codereview.chromium.org/1581473002 for Metro removal in installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-2
Patch Set: dual_mode Created 4 years, 11 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
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 // This file declares methods that are useful for integrating Chrome in 5 // This file declares methods that are useful for integrating Chrome in
6 // Windows shell. These methods are all static and currently part of 6 // Windows shell. These methods are all static and currently part of
7 // ShellUtil class. 7 // ShellUtil class.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 // Forces the shortcut's name to |shortcut_name_in|. 144 // Forces the shortcut's name to |shortcut_name_in|.
145 // Default: the current distribution's GetShortcutName(SHORTCUT_CHROME). 145 // Default: the current distribution's GetShortcutName(SHORTCUT_CHROME).
146 // The ".lnk" extension will automatically be added to this name. 146 // The ".lnk" extension will automatically be added to this name.
147 void set_shortcut_name(const base::string16& shortcut_name_in) { 147 void set_shortcut_name(const base::string16& shortcut_name_in) {
148 shortcut_name = shortcut_name_in; 148 shortcut_name = shortcut_name_in;
149 options |= PROPERTIES_SHORTCUT_NAME; 149 options |= PROPERTIES_SHORTCUT_NAME;
150 } 150 }
151 151
152 // Sets whether this is a dual mode shortcut (Win8+).
153 // Documentation on usage of the dual mode property on Win8:
154 // http://go.microsoft.com/fwlink/p/?linkid=243079
155 // NOTE: Only the default (no arguments and default browser appid) browser
156 // shortcut in the Start menu (Start screen on Win8+) should be made dual
157 // mode.
158 void set_dual_mode(bool dual_mode_in) {
159 dual_mode = dual_mode_in;
160 options |= PROPERTIES_DUAL_MODE;
161 }
162
163 // Sets whether to pin this shortcut to the taskbar after creating it 152 // Sets whether to pin this shortcut to the taskbar after creating it
164 // (ignored if the shortcut is only being updated). 153 // (ignored if the shortcut is only being updated).
165 // Note: This property doesn't have a mask in |options|. 154 // Note: This property doesn't have a mask in |options|.
166 void set_pin_to_taskbar(bool pin_to_taskbar_in) { 155 void set_pin_to_taskbar(bool pin_to_taskbar_in) {
167 pin_to_taskbar = pin_to_taskbar_in; 156 pin_to_taskbar = pin_to_taskbar_in;
168 } 157 }
169 158
170 bool has_target() const { 159 bool has_target() const {
171 return (options & PROPERTIES_TARGET) != 0; 160 return (options & PROPERTIES_TARGET) != 0;
172 } 161 }
(...skipping 11 matching lines...) Expand all
184 } 173 }
185 174
186 bool has_app_id() const { 175 bool has_app_id() const {
187 return (options & PROPERTIES_APP_ID) != 0; 176 return (options & PROPERTIES_APP_ID) != 0;
188 } 177 }
189 178
190 bool has_shortcut_name() const { 179 bool has_shortcut_name() const {
191 return (options & PROPERTIES_SHORTCUT_NAME) != 0; 180 return (options & PROPERTIES_SHORTCUT_NAME) != 0;
192 } 181 }
193 182
194 bool has_dual_mode() const {
195 return (options & PROPERTIES_DUAL_MODE) != 0;
196 }
197
198 // The level to install this shortcut at (CURRENT_USER for a per-user 183 // The level to install this shortcut at (CURRENT_USER for a per-user
199 // shortcut and SYSTEM_LEVEL for an all-users shortcut). 184 // shortcut and SYSTEM_LEVEL for an all-users shortcut).
200 ShellChange level; 185 ShellChange level;
201 186
202 base::FilePath target; 187 base::FilePath target;
203 base::string16 arguments; 188 base::string16 arguments;
204 base::string16 description; 189 base::string16 description;
205 base::FilePath icon; 190 base::FilePath icon;
206 int icon_index; 191 int icon_index;
207 base::string16 app_id; 192 base::string16 app_id;
208 base::string16 shortcut_name; 193 base::string16 shortcut_name;
209 bool dual_mode;
210 bool pin_to_taskbar; 194 bool pin_to_taskbar;
211 // Bitfield made of IndividualProperties. Properties set in |options| will 195 // Bitfield made of IndividualProperties. Properties set in |options| will
212 // be used to create/update the shortcut, others will be ignored on update 196 // be used to create/update the shortcut, others will be ignored on update
213 // and possibly replaced by default values on create (see individual 197 // and possibly replaced by default values on create (see individual
214 // property setters above for details on default values). 198 // property setters above for details on default values).
215 uint32_t options; 199 uint32_t options;
216 }; 200 };
217 201
218 // Relative path of the URL Protocol registry entry (prefixed with '\'). 202 // Relative path of the URL Protocol registry entry (prefixed with '\').
219 static const wchar_t* kRegURLProtocol; 203 static const wchar_t* kRegURLProtocol;
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 // Set/CreateRegWorkItems and runs them using WorkItemList. 640 // Set/CreateRegWorkItems and runs them using WorkItemList.
657 static bool AddRegistryEntries(HKEY root, 641 static bool AddRegistryEntries(HKEY root,
658 const ScopedVector<RegistryEntry>& entries); 642 const ScopedVector<RegistryEntry>& entries);
659 643
660 private: 644 private:
661 DISALLOW_COPY_AND_ASSIGN(ShellUtil); 645 DISALLOW_COPY_AND_ASSIGN(ShellUtil);
662 }; 646 };
663 647
664 648
665 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 649 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698