Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/web_intents_button_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/web_intents_button_view.cc b/chrome/browser/ui/views/location_bar/web_intents_button_view.cc |
| index c017a19eb0890d776688e98afbb45598ea973083..5a3ff0daa353664d65323c0d4ec9cafefb14aeb4 100644 |
| --- a/chrome/browser/ui/views/location_bar/web_intents_button_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/web_intents_button_view.cc |
| @@ -11,7 +11,6 @@ |
| #include "ui/base/animation/slide_animation.h" |
| #include "ui/base/animation/tween.h" |
| #include "ui/base/l10n/l10n_util.h" |
| -#include "ui/base/resource/resource_bundle.h" |
| // Animation time to open the button. |
| const int kMoveTimeMs = 150; |
| @@ -27,16 +26,18 @@ void WebIntentsButtonView::Update(TabContents* tab_contents) { |
| !tab_contents->web_intent_picker_controller()-> |
| ShowLocationBarPickerTool()) { |
| SetVisible(false); |
| - } else { |
| - SetVisible(true); |
| + return; |
| } |
| int animated_string_id = IDS_INTENT_PICKER_USE_ANOTHER_SERVICE; |
| string16 animated_text = l10n_util::GetStringUTF16(animated_string_id); |
| SetTooltipText(animated_text); |
| + SetVisible(true); |
| - StartLabelAnimation(animated_text, kMoveTimeMs); |
| + // Mark that we want to always draw the text button before we start animating |
| + // the label open. |
|
Peter Kasting
2012/09/17 20:04:27
This comment says what the code does; I was more i
Greg Billock
2012/09/17 21:23:18
Done.
|
| AlwaysDrawText(); |
| + StartLabelAnimation(animated_text, kMoveTimeMs); |
| } |
| void WebIntentsButtonView::OnClick(LocationBarView* parent) { |