Index: chrome/browser/ui/views/toolbar_view.cc |
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc |
index d7e9f70a37159722c1388e1494f3b6b0e9e78772..d506a12b0588d6a6264b5b87415249d01500692d 100644 |
--- a/chrome/browser/ui/views/toolbar_view.cc |
+++ b/chrome/browser/ui/views/toolbar_view.cc |
@@ -815,15 +815,24 @@ void ToolbarView::UpdateWrenchButtonSeverity() { |
incompatibility_badge_showing = false; |
if (ShouldShowUpgradeRecommended()) { |
- app_menu_->SetSeverity(WrenchIconPainter::SeverityFromUpgradeLevel( |
- UpgradeDetector::GetInstance()->upgrade_notification_stage())); |
+ WrenchIconPainter::Severity severity = |
+ WrenchIconPainter::SeverityFromUpgradeLevel( |
+ UpgradeDetector::GetInstance()->upgrade_notification_stage()); |
+ bool animate = true; |
+ if (severity == WrenchIconPainter::SEVERITY_LOW) { |
sky
2013/04/15 13:50:28
Could we consolidate this code in WrenchIconPainte
sail
2013/04/15 15:58:49
It's difficult to do because WrenchIconPainter can
sky
2013/04/15 16:54:55
Isn't this the only place that calls into WrenchIc
sail
2013/04/15 17:00:40
Right. We would still need to plumb extra informat
sail
2013/04/15 21:38:43
Actually, moving this to a static function in Wren
|
+ // Only animate low severity upgrades once. |
+ static bool s_should_animate = true; |
+ animate = s_should_animate; |
+ s_should_animate = false; |
+ } |
+ app_menu_->SetSeverity(severity, animate); |
return; |
} |
if (ShouldShowIncompatibilityWarning()) { |
if (!was_showing) |
content::RecordAction(UserMetricsAction("ConflictBadge")); |
- app_menu_->SetSeverity(WrenchIconPainter::SEVERITY_HIGH); |
+ app_menu_->SetSeverity(WrenchIconPainter::SEVERITY_HIGH, true); |
incompatibility_badge_showing = true; |
return; |
} |
@@ -834,11 +843,11 @@ void ToolbarView::UpdateWrenchButtonSeverity() { |
service->GetHighestSeverityGlobalErrorWithWrenchMenuItem(); |
if (error) { |
app_menu_->SetSeverity(WrenchIconPainter::SeverityFromGlobalErrorSeverity( |
- error->GetSeverity())); |
+ error->GetSeverity()), true); |
return; |
} |
- app_menu_->SetSeverity(WrenchIconPainter::SEVERITY_NONE); |
+ app_menu_->SetSeverity(WrenchIconPainter::SEVERITY_NONE, true); |
} |
void ToolbarView::OnShowHomeButtonChanged() { |