diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 18:34:12 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 18:34:12 +0000 |
commit | 201ebfe03681052d1233f12d18e47392dba761bd (patch) | |
tree | 5c8e3f614cca352f00869499dbe352a8fc79d532 /chrome | |
parent | 2326c76cd7fc51f691e6891cb5327afa8bf361e9 (diff) | |
download | chromium_src-201ebfe03681052d1233f12d18e47392dba761bd.zip chromium_src-201ebfe03681052d1233f12d18e47392dba761bd.tar.gz chromium_src-201ebfe03681052d1233f12d18e47392dba761bd.tar.bz2 |
Hide the theme install bubble a little earlier.
The bubble was showing at the same time as the installation confirmation dialog for non-theme extensions.
BUG=26130
Review URL: http://codereview.chromium.org/339055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/theme_install_bubble_view.mm | 10 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_install_ui.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/theme_install_bubble_view_gtk.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/theme_install_bubble_view.cc | 7 | ||||
-rw-r--r-- | chrome/common/notification_type.h | 6 |
5 files changed, 38 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/theme_install_bubble_view.mm b/chrome/browser/cocoa/theme_install_bubble_view.mm index f3c2c25..70a7cee 100644 --- a/chrome/browser/cocoa/theme_install_bubble_view.mm +++ b/chrome/browser/cocoa/theme_install_bubble_view.mm @@ -73,6 +73,16 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(NSWindow* window) this, NotificationType::EXTENSION_INSTALLED, NotificationService::AllSources()); + registrar_.Add( + this, + NotificationType::EXTENSION_INSTALL_ERROR, + NotificationService::AllSources()); + + // Don't let the bubble overlap the confirm dialog. + registrar_.Add( + this, + NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, + NotificationService::AllSources()); // Add the view. [cocoa_view_ setFrame:parent_bounds]; diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index 720e19d..1712791 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -17,6 +17,7 @@ #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/notification_service.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -113,6 +114,11 @@ void ExtensionInstallUI::ConfirmInstall(Delegate* delegate, IDR_EXTENSIONS_SECTION); } + NotificationService* service = NotificationService::current(); + service->Notify(NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, + Source<ExtensionInstallUI>(this), + NotificationService::NoDetails()); + ShowExtensionInstallPrompt(profile_, delegate, extension, install_icon, GetInstallWarning(extension)); diff --git a/chrome/browser/gtk/theme_install_bubble_view_gtk.cc b/chrome/browser/gtk/theme_install_bubble_view_gtk.cc index f3ea425..94b5471 100644 --- a/chrome/browser/gtk/theme_install_bubble_view_gtk.cc +++ b/chrome/browser/gtk/theme_install_bubble_view_gtk.cc @@ -65,6 +65,16 @@ ThemeInstallBubbleViewGtk::ThemeInstallBubbleViewGtk(GtkWidget* parent) this, NotificationType::EXTENSION_INSTALLED, NotificationService::AllSources()); + registrar_.Add( + this, + NotificationType::EXTENSION_INSTALL_ERROR, + NotificationService::AllSources()); + + // Don't let the bubble overlap the confirm dialog. + registrar_.Add( + this, + NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, + NotificationService::AllSources()); } ThemeInstallBubbleViewGtk::~ThemeInstallBubbleViewGtk() { diff --git a/chrome/browser/views/theme_install_bubble_view.cc b/chrome/browser/views/theme_install_bubble_view.cc index e305cd0..6f2fe06 100644 --- a/chrome/browser/views/theme_install_bubble_view.cc +++ b/chrome/browser/views/theme_install_bubble_view.cc @@ -58,6 +58,13 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(TabContents* tab_contents) this, NotificationType::EXTENSION_INSTALL_ERROR, NotificationService::AllSources()); + + // Don't let the bubble overlap the confirm dialog. + registrar_.Add( + this, + NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, + NotificationService::AllSources()); + gfx::Rect rc(0, 0, 0, 0); popup_ = new views::WidgetWin; popup_->set_window_style(WS_POPUP); diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h index 623e9da..86e09fd 100644 --- a/chrome/common/notification_type.h +++ b/chrome/common/notification_type.h @@ -407,6 +407,10 @@ class NotificationType { // NoDetails. EXTENSION_SHELF_VISIBILITY_PREF_CHANGED, + // Sent just before the installation confirm dialog is shown. The source + // is the ExtensionInstallUI, the details are NoDetails. + EXTENSION_WILL_SHOW_CONFIRM_DIALOG, + // Used to monitor web cache usage by notifying whenever the // CacheManagerHost observes new UsageStats. The source will be the // RenderProcessHost that corresponds to the new statistics. Details are a @@ -726,7 +730,7 @@ class NotificationType { // Sent when the blacklist manager encounters an error. The details are // a string16 (error message), and the source is a Profile. BLACKLIST_MANAGER_ERROR, - + // Sent by the resource dispatcher host when a resource is blocked. BLACKLIST_BLOCKED_RESOURCE, |