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..2fb395c19adbb058c3e5e5c1d424ac8c06441302 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,12 @@ ToolbarView::ToolbarView(Browser* browser) |
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, |
content::NotificationService::AllSources()); |
+// This should only be available on non-Chrome OS desktop platforms. |
+#if defined(OS_WIN) || defined(OS_MACOSX) || \ |
Ben Goodger (Google)
2013/02/13 22:35:44
instead of having these ifdefs everywhere, how abo
MAD
2013/02/14 14:04:06
Done.
|
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
+ registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL, |
+ content::NotificationService::AllSources()); |
+#endif |
#if defined(OS_WIN) |
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED, |
content::NotificationService::AllSources()); |
@@ -546,6 +553,12 @@ void ToolbarView::Observe(int type, |
case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED: |
UpdateAppMenuState(); |
break; |
+#if defined(OS_WIN) || defined(OS_MACOSX) || \ |
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
+ case chrome::NOTIFICATION_OUTDATED_INSTALL: |
+ ShowOutdatedInstallNotification(); |
+ break; |
+#endif |
#if defined(OS_WIN) |
case chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED: |
ShowCriticalNotification(); |
@@ -886,6 +899,14 @@ void ToolbarView::ShowCriticalNotification() { |
#endif |
} |
+void ToolbarView::ShowOutdatedInstallNotification() { |
+// This should only work on non-Chrome OS desktop platforms. |
+#if defined(OS_WIN) || defined(OS_MACOSX) || \ |
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
+ OutdatedUpgradeBubbleView::ShowBubble(app_menu_, browser_); |
+#endif |
+} |
+ |
void ToolbarView::UpdateAppMenuState() { |
string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP); |
if (ShouldShowUpgradeRecommended()) { |