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 // This file defines a class that contains various method related to branding. | 5 // This file defines a class that contains various method related to branding. |
6 // It provides only default implementations of these methods. Usually to add | 6 // It provides only default implementations of these methods. Usually to add |
7 // specific branding, we will need to extend this class with a custom | 7 // specific branding, we will need to extend this class with a custom |
8 // implementation. | 8 // implementation. |
9 | 9 |
10 #include "chrome/installer/util/browser_distribution.h" | 10 #include "chrome/installer/util/browser_distribution.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 } | 147 } |
148 | 148 |
149 string16 BrowserDistribution::GetAppGuid() { | 149 string16 BrowserDistribution::GetAppGuid() { |
150 return L""; | 150 return L""; |
151 } | 151 } |
152 | 152 |
153 string16 BrowserDistribution::GetBaseAppName() { | 153 string16 BrowserDistribution::GetBaseAppName() { |
154 return L"Chromium"; | 154 return L"Chromium"; |
155 } | 155 } |
156 | 156 |
157 string16 BrowserDistribution::GetAppShortCutName() { | 157 string16 BrowserDistribution::GetDisplayName() { |
158 return GetBaseAppName(); | 158 return GetShortcutInfo(SHORTCUT_CHROME).name; |
159 } | 159 } |
160 | 160 |
161 string16 BrowserDistribution::GetAlternateApplicationName() { | 161 BrowserDistribution::ShortcutInfo BrowserDistribution::GetShortcutInfo( |
162 return L"The Internet"; | 162 ShortcutEnum shortcut_enum) { |
163 ShortcutInfo info; | |
164 switch (shortcut_enum) { | |
165 case SHORTCUT_CHROME: | |
166 info.name = GetBaseAppName(); | |
167 info.icon_index = 0; | |
168 break; | |
169 case SHORTCUT_ALTERNATE_CHROME: | |
170 info.name = L"The Internet"; | |
171 info.icon_index = 0; | |
172 break; | |
173 case SHORTCUT_APP_LAUNCHER: | |
174 // TODO(calamity): Replace with a localized string. | |
gab
2013/05/24 15:01:35
I don't think we have localized Chromium strings i
grt (UTC plus 2)
2013/05/29 13:50:09
Although this wasn't always the case, I think it i
| |
175 info.name = L"Chromium App Launcher"; | |
176 info.icon_index = 1; | |
177 break; | |
178 default: | |
179 NOTREACHED(); | |
180 return ShortcutInfo(); | |
181 } | |
182 return info; | |
183 } | |
184 | |
185 string16 BrowserDistribution::GetStartMenuShortcutSubfolder( | |
186 SubfolderEnum subfolder_enum) { | |
187 switch (subfolder_enum) { | |
188 case SUBFOLDER_CHROME: | |
189 return GetShortcutInfo(SHORTCUT_CHROME).name; | |
190 break; | |
191 default: | |
192 NOTREACHED(); | |
193 return string16(); | |
194 } | |
163 } | 195 } |
164 | 196 |
165 string16 BrowserDistribution::GetBaseAppId() { | 197 string16 BrowserDistribution::GetBaseAppId() { |
166 return L"Chromium"; | 198 return L"Chromium"; |
167 } | 199 } |
168 | 200 |
169 string16 BrowserDistribution::GetInstallSubDir() { | 201 string16 BrowserDistribution::GetInstallSubDir() { |
170 return L"Chromium"; | 202 return L"Chromium"; |
171 } | 203 } |
172 | 204 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 } | 253 } |
222 | 254 |
223 bool BrowserDistribution::CanSetAsDefault() { | 255 bool BrowserDistribution::CanSetAsDefault() { |
224 return true; | 256 return true; |
225 } | 257 } |
226 | 258 |
227 bool BrowserDistribution::CanCreateDesktopShortcuts() { | 259 bool BrowserDistribution::CanCreateDesktopShortcuts() { |
228 return true; | 260 return true; |
229 } | 261 } |
230 | 262 |
231 string16 BrowserDistribution::GetIconFilename() { | |
232 return string16(); | |
233 } | |
234 | |
235 int BrowserDistribution::GetIconIndex() { | |
236 // Assuming that main icon appears first alphabetically in the resource file | |
237 // for GetIconFilename(). | |
238 return 0; | |
239 } | |
240 | |
241 bool BrowserDistribution::GetChromeChannel(string16* channel) { | 263 bool BrowserDistribution::GetChromeChannel(string16* channel) { |
242 return false; | 264 return false; |
243 } | 265 } |
244 | 266 |
245 bool BrowserDistribution::GetCommandExecuteImplClsid( | 267 bool BrowserDistribution::GetCommandExecuteImplClsid( |
246 string16* handler_class_uuid) { | 268 string16* handler_class_uuid) { |
247 if (handler_class_uuid) | 269 if (handler_class_uuid) |
248 *handler_class_uuid = kCommandExecuteImplUuid; | 270 *handler_class_uuid = kCommandExecuteImplUuid; |
249 return true; | 271 return true; |
250 } | 272 } |
251 | 273 |
252 bool BrowserDistribution::AppHostIsSupported() { | 274 bool BrowserDistribution::AppHostIsSupported() { |
253 return false; | 275 return false; |
254 } | 276 } |
255 | 277 |
256 void BrowserDistribution::UpdateInstallStatus(bool system_install, | 278 void BrowserDistribution::UpdateInstallStatus(bool system_install, |
257 installer::ArchiveType archive_type, | 279 installer::ArchiveType archive_type, |
258 installer::InstallStatus install_status) { | 280 installer::InstallStatus install_status) { |
259 } | 281 } |
260 | 282 |
261 bool BrowserDistribution::ShouldSetExperimentLabels() { | 283 bool BrowserDistribution::ShouldSetExperimentLabels() { |
262 return false; | 284 return false; |
263 } | 285 } |
264 | 286 |
265 bool BrowserDistribution::HasUserExperiments() { | 287 bool BrowserDistribution::HasUserExperiments() { |
266 return false; | 288 return false; |
267 } | 289 } |
290 | |
grt (UTC plus 2)
2013/05/29 13:50:09
is this an extra blank line? if so, please remove.
calamity
2013/05/31 00:11:18
Done.
| |
OLD | NEW |