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

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: Correct pixel spacing 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
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) {

Powered by Google App Engine
This is Rietveld 408576698