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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h

Issue 1763713004: Adjusts content bubble animation with respect to icon size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjusts content bubble animation with respect to icon size (code comment) Created 4 years, 10 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/icon_label_bubble_view.h
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index f1a58d69658e70239a52d6c293add91fd8085987..1fa3fa489f44d2a8273ca447b2874f99cc0773a6 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -52,8 +52,8 @@ class IconLabelBubbleView : public views::InkDropHostView {
views::ImageView* GetImageView() { return image_; }
protected:
- views::ImageView* image() { return image_; }
- views::Label* label() { return label_; }
+ views::ImageView* image() const { return image_; }
+ views::Label* label() const { return label_; }
Peter Kasting 2016/03/07 20:24:27 Don't make these changes, or else make them by add
varkha 2016/03/08 18:01:04 Done.
// Gets the color for displaying text.
virtual SkColor GetTextColor() const = 0;
@@ -70,6 +70,12 @@ class IconLabelBubbleView : public views::InkDropHostView {
// full-width view and can be used to animate the width of the view.
virtual double WidthMultiplier() const;
+ // Stops animation if it is in progress.
+ virtual void StopAnimation();
+
+ // Returns true when animation is in progress and is shrinking.
+ virtual bool IsShrinking() const;
+
// Returns the amount of horizontal space needed to draw the image and its
// padding before the label.
virtual int GetImageAndPaddingWidth() const;
@@ -89,16 +95,16 @@ class IconLabelBubbleView : public views::InkDropHostView {
gfx::Size GetSizeForLabelWidth(int width) const;
- private:
- // Sets a background color on |label_| based on |chip_background_color| and
- // the parent's bg color.
- void SetLabelBackgroundColor(SkColor chip_background_color);
-
// Amount of padding at the edges of the bubble. If |leading| is true, this
Peter Kasting 2016/03/07 20:24:27 Nit: For clarity you might want to be a bit more p
varkha 2016/03/08 18:01:03 Done.
// is the padding at the beginning of the bubble (left in LTR), otherwise it's
// the end padding.
Peter Kasting 2016/03/07 20:24:27 Nit: end -> trailing
varkha 2016/03/08 18:01:04 Done.
int GetBubbleOuterPadding(bool leading) const;
+ private:
+ // Sets a background color on |label_| based on |chip_background_color| and
+ // the parent's bg color.
+ void SetLabelBackgroundColor(SkColor chip_background_color);
+
// As above, but for Material Design. TODO(estade): remove/replace the above.
int GetBubbleOuterPaddingMd(bool leading) const;

Powered by Google App Engine
This is Rietveld 408576698