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

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

Issue 325433002: Elevated install of recovery component (UI part). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/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/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()) {
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_view.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698