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

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

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to comments, merge Created 6 years, 9 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/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..c7f610bf33e2ebcad802a85f3623c2970951670a 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 {
@@ -65,9 +66,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 LabelPosition();
+
// 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 +102,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);
};

Powered by Google App Engine
This is Rietveld 408576698