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

Unified Diff: chrome/browser/ui/views/location_bar/web_intents_button_view.cc

Issue 10917280: Fix up views web intents location bar decoration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add period Created 8 years, 3 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 | « chrome/browser/ui/views/location_bar/web_intents_button_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/ui/views/location_bar/web_intents_button_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698