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

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

Issue 16209002: ContentSettingImageView cleanup, phase 2. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/content_setting_image_view.h
===================================================================
--- chrome/browser/ui/views/location_bar/content_setting_image_view.h (revision 202917)
+++ chrome/browser/ui/views/location_bar/content_setting_image_view.h (working copy)
@@ -52,6 +52,14 @@
void Update(content::WebContents* web_contents);
private:
+ // Number of milliseconds spent animating open; also the time spent animating
+ // closed.
+ static const int kOpenTimeMS;
+
+ // The total animation time, including open and close as well as an
+ // intervening "stay open" period.
+ static const int kAnimationDurationMS;
+
// ui::AnimationDelegate:
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
@@ -67,14 +75,16 @@
// views::WidgetObserver:
virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
+ bool background_showing() const {
+ return slide_animator_.is_animating() || pause_animation_;
+ }
+
// Invoked when the user clicks on the control.
- void OnClick(LocationBarView* parent);
+ void OnClick();
- int GetTextAnimationSize(double state, int text_size);
-
LocationBarView* parent_; // Weak, owns us.
scoped_ptr<ContentSettingImageModel> content_setting_image_model_;
- views::HorizontalPainter background_painter_;
+ scoped_ptr<views::Painter> background_painter_;
views::ImageView* icon_;
views::Label* text_label_;
ui::SlideAnimation slide_animator_;
@@ -85,7 +95,6 @@
// TODO(pkasting): Eliminate these.
gfx::Font font_;
int text_size_;
- int visible_text_size_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698