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..5ceaf288937e9402e0d601413cc34a079854f527 100644 |
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm |
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm |
@@ -561,8 +561,17 @@ class NotificationBridge |
WrenchToolbarButtonCell* cell = |
base::mac::ObjCCastStrict<WrenchToolbarButtonCell>([wrenchButton_ cell]); |
if (UpgradeDetector::GetInstance()->notify_upgrade()) { |
- [cell setSeverity:WrenchIconPainter::SeverityFromUpgradeLevel( |
- UpgradeDetector::GetInstance()->upgrade_notification_stage())]; |
+ WrenchIconPainter::Severity severity = |
+ WrenchIconPainter::SeverityFromUpgradeLevel( |
+ UpgradeDetector::GetInstance()->upgrade_notification_stage()); |
+ bool shouldAnimate = true; |
+ if (severity == WrenchIconPainter::SEVERITY_LOW) { |
+ // Only animate low severity upgrades once. |
+ static bool sShouldAnimate = true; |
+ shouldAnimate = sShouldAnimate; |
+ sShouldAnimate = false; |
+ } |
+ [cell setSeverity:severity shouldAnimate:shouldAnimate]; |
return; |
} |
@@ -570,11 +579,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 { |