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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 7948003: Update error badge on wrench menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 years, 3 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 | « no previous file | chrome/browser/ui/global_error_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 7c72d564f19b9168192d6089b8db1cf70dfa6d81..355ca55f2c1363ff904aaf5575eeaf051e0f6fa4 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -81,7 +81,8 @@ const CGFloat kWrenchMenuLeftPadding = 3.0;
} // namespace
-@interface ToolbarController(Private)
+@interface ToolbarController()
+@property(assign, nonatomic) Browser* browser;
- (void)addAccessibilityDescriptions;
- (void)initCommandStatus:(CommandUpdater*)commands;
- (void)prefChanged:(std::string*)prefName;
@@ -128,6 +129,8 @@ class NotificationBridge : public NotificationObserver {
: controller_(controller) {
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
NotificationService::AllSources());
+ registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
+ Source<Profile>([controller browser]->profile()));
}
// Overridden from NotificationObserver:
@@ -139,6 +142,7 @@ class NotificationBridge : public NotificationObserver {
[controller_ prefChanged:Details<std::string>(details).ptr()];
break;
case chrome::NOTIFICATION_UPGRADE_RECOMMENDED:
+ case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED:
[controller_ badgeWrenchMenuIfNeeded];
break;
default:
@@ -156,6 +160,8 @@ class NotificationBridge : public NotificationObserver {
@implementation ToolbarController
+@synthesize browser = browser_;
+
- (id)initWithModel:(ToolbarModel*)model
commands:(CommandUpdater*)commands
profile:(Profile*)profile
« no previous file with comments | « no previous file | chrome/browser/ui/global_error_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698