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

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

Issue 14245003: Wrench Icon: Only animate low severity status once (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/cocoa/toolbar/wrench_toolbar_button_cell.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 08b7371da8005d7717c0477c3de5c65741d5add1..7fff2a1624c3a7fd7371782a4642e8a858b85e52 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -561,8 +561,10 @@ class NotificationBridge
WrenchToolbarButtonCell* cell =
base::mac::ObjCCastStrict<WrenchToolbarButtonCell>([wrenchButton_ cell]);
if (UpgradeDetector::GetInstance()->notify_upgrade()) {
- [cell setSeverity:WrenchIconPainter::SeverityFromUpgradeLevel(
- UpgradeDetector::GetInstance()->upgrade_notification_stage())];
+ UpgradeDetector::UpgradeNotificationAnnoyanceLevel level =
+ UpgradeDetector::GetInstance()->upgrade_notification_stage();
+ [cell setSeverity:WrenchIconPainter::SeverityFromUpgradeLevel(level)
+ shouldAnimate:WrenchIconPainter::ShouldAnimateUpgradeLevel(level)];
return;
}
@@ -570,11 +572,12 @@ class NotificationBridge
browser_->profile())->GetHighestSeverityGlobalErrorWithWrenchMenuItem();
if (error) {
[cell setSeverity:WrenchIconPainter::SeverityFromGlobalErrorSeverity(
- error->GetSeverity())];
+ error->GetSeverity())
+ shouldAnimate:YES];
return;
}
- [cell setSeverity:WrenchIconPainter::SEVERITY_NONE];
+ [cell setSeverity:WrenchIconPainter::SEVERITY_NONE shouldAnimate:YES];
}
- (void)prefChanged:(const std::string&)prefName {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698