Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_icon_view.h |
| diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.h b/chrome/browser/ui/views/location_bar/location_icon_view.h |
| index f056a1c43e1930cd3ba6d47d3067bccfe2262377..51ccf3a2fa3803584d4c12cf897834bfb8f868cc 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_icon_view.h |
| +++ b/chrome/browser/ui/views/location_bar/location_icon_view.h |
| @@ -7,6 +7,8 @@ |
| #include "base/macros.h" |
| #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
| +#include "ui/gfx/animation/animation_delegate.h" |
| +#include "ui/gfx/animation/slide_animation.h" |
| class LocationBarView; |
| @@ -18,7 +20,8 @@ class LocatedEvent; |
| // Use a LocationIconView to display an icon on the leading side of the edit |
| // field. It shows the user's current action (while the user is editing), or the |
| // page security status (after navigation has completed). |
| -class LocationIconView : public IconLabelBubbleView { |
| +class LocationIconView : public IconLabelBubbleView, |
| + private gfx::AnimationDelegate { |
|
Peter Kasting
2016/07/19 21:17:21
Private inheritance is banned. Use composition or
Kevin Bailey
2016/08/12 18:49:15
Done.
|
| public: |
| LocationIconView(const gfx::FontList& font_list, |
| SkColor parent_background_color, |
| @@ -49,6 +52,12 @@ class LocationIconView : public IconLabelBubbleView { |
| // HTTPS contexts. |
| void SetBackground(bool should_show_ev); |
| + void StartAnimation(); |
| + void AnimationProgressed(const gfx::Animation*) override; |
| +// int GetLabelPreferredWidth() const override; |
| + double WidthMultiplier() const override; |
| + bool IsShrinking() const override; |
| + |
| private: |
| void ProcessLocatedEvent(const ui::LocatedEvent& event); |
| @@ -69,6 +78,10 @@ class LocationIconView : public IconLabelBubbleView { |
| LocationBarView* location_bar_; |
| + gfx::SlideAnimation animation_; |
| + |
| + bool animation_already_started_; |
|
Peter Kasting
2016/07/19 21:17:21
Nit: Would probably remove "already_". But note t
Kevin Bailey
2016/08/12 18:49:15
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(LocationIconView); |
| }; |