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

Unified Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 11440020: Add an outdated upgrade bubble view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed CR comments... Created 7 years, 11 months 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
Index: chrome/browser/ui/views/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index f59d27c6eaf4f6044506874b45e09eb271034554..93b4d184f43d271640de57cb891f271017bd0bc4 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -60,6 +60,7 @@
#if defined(OS_WIN)
#include "chrome/browser/enumerate_modules_model_win.h"
#include "chrome/browser/ui/views/critical_notification_bubble_view.h"
+#include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h"
#if !defined(USE_AURA)
#include "chrome/browser/ui/views/app_menu_button_win.h"
#endif
@@ -191,6 +192,8 @@ ToolbarView::ToolbarView(Browser* browser)
#if defined(OS_WIN)
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
content::NotificationService::AllSources());
+ registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL,
+ content::NotificationService::AllSources());
#endif
registrar_.Add(this,
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
@@ -552,6 +555,9 @@ void ToolbarView::Observe(int type,
case chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED:
ShowCriticalNotification();
break;
+ case chrome::NOTIFICATION_OUTDATED_INSTALL:
+ ShowOutdatedInstallNotification();
+ break;
#endif
default:
NOTREACHED();
@@ -886,10 +892,20 @@ void ToolbarView::LoadImages() {
void ToolbarView::ShowCriticalNotification() {
#if defined(OS_WIN)
- CriticalNotificationBubbleView* bubble_delegate =
- new CriticalNotificationBubbleView(app_menu_);
- views::BubbleDelegateView::CreateBubble(bubble_delegate);
- bubble_delegate->StartFade(true);
+ // The upgrade bubble shows up on start up, so should always be there before
+ // we try to show the CriticalNotificationBubbleView, and never after.
+ if (!OutdatedUpgradeBubbleView::IsShowing()) {
+ CriticalNotificationBubbleView* bubble_delegate =
+ new CriticalNotificationBubbleView(app_menu_);
+ views::BubbleDelegateView::CreateBubble(bubble_delegate);
+ bubble_delegate->StartFade(true);
+ }
+#endif
+}
+
+void ToolbarView::ShowOutdatedInstallNotification() {
+#if defined(OS_WIN)
+ OutdatedUpgradeBubbleView::ShowBubble(app_menu_, browser_);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698