| 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..88fa270f15eadd6f6464b22ddf8c0c21427ba6f1 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,14 +11,15 @@
|
| #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;
|
|
|
| WebIntentsButtonView::WebIntentsButtonView(LocationBarView* parent,
|
| - const int background_images[])
|
| - : LocationBarDecorationView(parent, background_images) {
|
| + const int background_images[],
|
| + const gfx::Font& font,
|
| + SkColor font_color)
|
| + : LocationBarDecorationView(parent, background_images, font, font_color) {
|
| }
|
|
|
| void WebIntentsButtonView::Update(TabContents* tab_contents) {
|
| @@ -27,16 +28,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);
|
| + // Set the flag to draw text before we start to draw the label, to avoid
|
| + // any possible race.
|
| AlwaysDrawText();
|
| + StartLabelAnimation(animated_text, kMoveTimeMs);
|
| }
|
|
|
| void WebIntentsButtonView::OnClick(LocationBarView* parent) {
|
|
|