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

Unified Diff: chrome/browser/extensions/extension_install_ui.cc

Issue 376014: Reland Extension Installed InfoBubble (Closed)
Patch Set: Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.h ('k') | chrome/browser/views/browser_actions_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_install_ui.cc
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 17127919c985fb03bbc216d567b16e63156fcdb4..ae13fc5002a01571281be02b360029734720edac 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -16,6 +16,9 @@
#include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#if defined(TOOLKIT_VIEWS) // TODO(port)
+#include "chrome/browser/views/extensions/extension_installed_bubble.h"
+#endif // TOOLKIT_VIEWS
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
#include "grit/browser_resources.h"
@@ -113,19 +116,35 @@ void ExtensionInstallUI::ConfirmInstall(Delegate* delegate,
install_icon = ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_EXTENSIONS_SECTION);
}
+ icon_ = *install_icon;
NotificationService* service = NotificationService::current();
service->Notify(NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
Source<ExtensionInstallUI>(this),
NotificationService::NoDetails());
- ShowExtensionInstallPrompt(profile_, delegate, extension, install_icon,
+ ShowExtensionInstallPrompt(profile_, delegate, extension, &icon_,
GetInstallWarning(extension));
-
}
void ExtensionInstallUI::OnInstallSuccess(Extension* extension) {
- ShowThemeInfoBar(extension);
+ if (extension->IsTheme()) {
+ ShowThemeInfoBar(extension);
+ return;
+ }
+
+#if defined(TOOLKIT_VIEWS)
+ // GetLastActiveWithProfile will fail on the build bots. This needs to
+ // implemented differently if any test is created which depends on
+ // ExtensionInstalledBubble showing.
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ if (!browser)
+ return;
+
+ ExtensionInstalledBubble::Show(extension, browser, icon_);
+#else
+// TODO(port) crbug.com/26973 (linux) crbug.com/26974 (mac)
+#endif // TOOLKIT_VIEWS
}
void ExtensionInstallUI::OnInstallFailure(const std::string& error) {
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.h ('k') | chrome/browser/views/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698