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

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 OWNERS comments... Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b74a9b5846280dade413f247ea897317d1ec65dc..bf04e7547ec473060f21bb636ca16fe5f1e6eb23 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -30,6 +30,7 @@
#include "chrome/browser/ui/views/home_button.h"
#include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
#include "chrome/browser/ui/views/location_bar/star_view.h"
+#include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h"
#include "chrome/browser/ui/views/wrench_menu.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/chrome_notification_types.h"
@@ -186,6 +187,10 @@ ToolbarView::ToolbarView(Browser* browser)
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
content::NotificationService::AllSources());
+ if (OutdatedUpgradeBubbleView::IsAvailable()) {
+ registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL,
+ content::NotificationService::AllSources());
+ }
#if defined(OS_WIN)
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
content::NotificationService::AllSources());
@@ -546,6 +551,9 @@ void ToolbarView::Observe(int type,
case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED:
UpdateAppMenuState();
break;
+ case chrome::NOTIFICATION_OUTDATED_INSTALL:
+ ShowOutdatedInstallNotification();
+ break;
#if defined(OS_WIN)
case chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED:
ShowCriticalNotification();
@@ -886,6 +894,11 @@ void ToolbarView::ShowCriticalNotification() {
#endif
}
+void ToolbarView::ShowOutdatedInstallNotification() {
+ if (OutdatedUpgradeBubbleView::IsAvailable())
+ OutdatedUpgradeBubbleView::ShowBubble(app_menu_, browser_);
+}
+
void ToolbarView::UpdateAppMenuState() {
string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
if (ShouldShowUpgradeRecommended()) {
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698