OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/extensions/extension_install_ui.h" | 5 #include "chrome/browser/extensions/extension_install_ui.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 void ExtensionInstallUI::ShowGenericExtensionInstalledInfoBar( | 344 void ExtensionInstallUI::ShowGenericExtensionInstalledInfoBar( |
345 Extension* new_extension) { | 345 Extension* new_extension) { |
346 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); | 346 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); |
347 if (!browser) | 347 if (!browser) |
348 return; | 348 return; |
349 | 349 |
350 TabContents* tab_contents = browser->GetSelectedTabContents(); | 350 TabContents* tab_contents = browser->GetSelectedTabContents(); |
351 if (!tab_contents) | 351 if (!tab_contents) |
352 return; | 352 return; |
353 | 353 |
354 std::wstring msg = l10n_util::GetStringF(IDS_EXTENSION_INSTALLED_HEADING, | 354 string16 msg = |
355 UTF8ToWide(new_extension->name())) + | 355 l10n_util::GetStringFUTF16(IDS_EXTENSION_INSTALLED_HEADING, |
viettrungluu
2010/08/13 19:22:03
Indent 2 more spaces (and below too, to align).
| |
356 L" " + l10n_util::GetString(IDS_EXTENSION_INSTALLED_MANAGE_INFO_MAC); | 356 UTF8ToUTF16(new_extension->name())) + |
357 UTF8ToUTF16(" ") + | |
358 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_MANAGE_INFO_MAC); | |
357 InfoBarDelegate* delegate = new SimpleAlertInfoBarDelegate( | 359 InfoBarDelegate* delegate = new SimpleAlertInfoBarDelegate( |
358 tab_contents, msg, new SkBitmap(icon_), true); | 360 tab_contents, msg, new SkBitmap(icon_), true); |
359 tab_contents->AddInfoBar(delegate); | 361 tab_contents->AddInfoBar(delegate); |
360 } | 362 } |
361 #endif | 363 #endif |
362 | 364 |
363 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( | 365 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( |
364 TabContents* tab_contents, Extension* new_theme, | 366 TabContents* tab_contents, Extension* new_theme, |
365 const std::string& previous_theme_id, bool previous_use_system_theme) { | 367 const std::string& previous_theme_id, bool previous_use_system_theme) { |
366 #if defined(TOOLKIT_GTK) | 368 #if defined(TOOLKIT_GTK) |
367 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 369 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
368 previous_theme_id, previous_use_system_theme); | 370 previous_theme_id, previous_use_system_theme); |
369 #else | 371 #else |
370 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 372 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
371 previous_theme_id); | 373 previous_theme_id); |
372 #endif | 374 #endif |
373 } | 375 } |
OLD | NEW |