Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/origin_chip_view.h |
| diff --git a/chrome/browser/ui/views/location_bar/origin_chip_view.h b/chrome/browser/ui/views/location_bar/origin_chip_view.h |
| index bb2d19d27631a2f29c39a7aebaae31284e4fd5b9..82014325f9122b4f06ff53e8aa70dc1b396e9b61 100644 |
| --- a/chrome/browser/ui/views/location_bar/origin_chip_view.h |
| +++ b/chrome/browser/ui/views/location_bar/origin_chip_view.h |
| @@ -22,6 +22,7 @@ class WebContents; |
| namespace gfx { |
| class Canvas; |
| class FontList; |
| +class SlideAnimation; |
| } |
| namespace views { |
| @@ -38,8 +39,6 @@ class OriginChipView : public views::LabelButton, |
| const gfx::FontList& font_list); |
| virtual ~OriginChipView(); |
| - void Init(); |
| - |
| // Returns true if the origin chip should be visible. This will always be |
| // true if the original origin chip experiment is enabled. If the V2 |
| // experiment is enabled this is true if the chip hasn't been hidden by |
| @@ -65,9 +64,18 @@ class OriginChipView : public views::LabelButton, |
| // width, since the hostname will not be elided past the TLD+1. |
| int ElideDomainTarget(int target_max_width); |
| + // Starts an animation that fades in the border. |
| + void FadeIn(); |
| + |
| + // Returns the current X position of the host label. |
| + int label_position() const { return host_label_->x(); } |
|
Peter Kasting
2014/03/25 22:20:40
Nit: Since you're renaming this anyway, perhaps it
Justin Donnelly
2014/03/26 16:15:47
Done.
|
| + |
| // views::LabelButton: |
| + virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; |
| + virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; |
| virtual gfx::Size GetPreferredSize() OVERRIDE; |
| virtual void Layout() OVERRIDE; |
| + virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE; |
| // views::ButtonListener: |
| virtual void ButtonPressed(views::Button* sender, |
| @@ -92,6 +100,7 @@ class OriginChipView : public views::LabelButton, |
| GURL url_displayed_; |
| ToolbarModel::SecurityLevel security_level_; |
| bool url_malware_; |
| + scoped_ptr<gfx::SlideAnimation> fade_in_animation_; |
| DISALLOW_COPY_AND_ASSIGN(OriginChipView); |
| }; |