diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 20:28:54 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 20:28:54 +0000 |
commit | ae3968b3e76f0fd95b9a34c762e936f0bfde65d3 (patch) | |
tree | 8351655753593306a3c79c46d081c3664ede1803 /chrome/browser/extensions | |
parent | 69094b326c659f5d6d3d20bad0815af9efff3950 (diff) | |
download | chromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.zip chromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.tar.gz chromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.tar.bz2 |
Add platform abstraction for simple error box, and use it in a couple extensions-related places.
Also add a virtual destructor in some unrelated infobar.
BUG=27691
Review URL: http://codereview.chromium.org/427002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extension_install_ui.cc | 7 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_install_ui.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index 72a7c1e..c737f8f 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -21,6 +21,7 @@ #endif // TOOLKIT_VIEWS #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_service.h" +#include "chrome/common/platform_util.h" #include "chrome/common/url_constants.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" @@ -201,7 +202,11 @@ void ExtensionInstallUI::OnInstallSuccess(Extension* extension) { void ExtensionInstallUI::OnInstallFailure(const std::string& error) { DCHECK(ui_loop_ == MessageLoop::current()); - ShowExtensionInstallError(error); + Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); + platform_util::SimpleErrorBox( + browser ? browser->window()->GetNativeHandle() : NULL, + l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALL_FAILURE_TITLE), + UTF8ToUTF16(error)); } void ExtensionInstallUI::OnOverinstallAttempted(Extension* extension) { diff --git a/chrome/browser/extensions/extension_install_ui.h b/chrome/browser/extensions/extension_install_ui.h index 0267450..f2dc82a 100644 --- a/chrome/browser/extensions/extension_install_ui.h +++ b/chrome/browser/extensions/extension_install_ui.h @@ -46,9 +46,6 @@ class ExtensionInstallUI { SkBitmap* install_icon, const std::wstring& warning_text); - // NOTE: The implementations of this function is platform-specific. - static void ShowExtensionInstallError(const std::string& error); - explicit ExtensionInstallUI(Profile* profile); // This is called by the installer to verify whether the installation should |