Index: chrome/browser/ui/views/toolbar/toolbar_view.cc |
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc |
index 107005e2e3be0b2fceece486f29051e315389065..7ec47f2b507a11fcf5fd7c9599f578eef2e20e05 100644 |
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc |
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc |
@@ -37,6 +37,7 @@ |
#include "chrome/browser/ui/views/location_bar/star_view.h" |
#include "chrome/browser/ui/views/location_bar/translate_icon_view.h" |
#include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h" |
+#include "chrome/browser/ui/views/recovery_component_bubble_view.h" |
#include "chrome/browser/ui/views/toolbar/back_button.h" |
#include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
#include "chrome/browser/ui/views/toolbar/home_button.h" |
@@ -159,6 +160,10 @@ ToolbarView::ToolbarView(Browser* browser) |
registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
content::NotificationService::AllSources()); |
} |
+ if (RecoveryComponentBubbleView::IsAvailable()) { |
+ registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_NEEDS_ELEVATION, |
+ content::NotificationService::AllSources()); |
+ } |
#if defined(OS_WIN) |
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED, |
content::NotificationService::AllSources()); |
@@ -503,6 +508,9 @@ void ToolbarView::Observe(int type, |
ShowCriticalNotification(); |
break; |
#endif |
+ case chrome::NOTIFICATION_UPGRADE_NEEDS_ELEVATION: |
+ ShowRecoveryComponentNotification(); |
+ break; |
default: |
NOTREACHED(); |
} |
@@ -783,6 +791,12 @@ void ToolbarView::ShowOutdatedInstallNotification(bool auto_update_enabled) { |
} |
} |
+void ToolbarView::ShowRecoveryComponentNotification() { |
+ if (RecoveryComponentBubbleView::IsAvailable()) { |
+ RecoveryComponentBubbleView::ShowBubble(app_menu_); |
+ } |
+} |
+ |
void ToolbarView::UpdateAppMenuState() { |
base::string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP); |
if (ShouldShowUpgradeRecommended()) { |