Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 public ui::AnimationDelegate, | 36 public ui::AnimationDelegate, |
| 37 public views::WidgetObserver, | 37 public views::WidgetObserver, |
| 38 public TouchableLocationBarView { | 38 public TouchableLocationBarView { |
| 39 public: | 39 public: |
| 40 ContentSettingImageView(ContentSettingsType content_type, | 40 ContentSettingImageView(ContentSettingsType content_type, |
| 41 LocationBarView* parent); | 41 LocationBarView* parent); |
| 42 virtual ~ContentSettingImageView(); | 42 virtual ~ContentSettingImageView(); |
| 43 | 43 |
| 44 // |new_navigation| true if this is a new navigation, false if the tab was | 44 // |new_navigation| true if this is a new navigation, false if the tab was |
| 45 // just switched to. | 45 // just switched to. |
| 46 void UpdateFromWebContents(content::WebContents* web_contents); | 46 void Update(TabContents* tab_contents); |
| 47 | 47 |
| 48 // views::View overrides: | 48 // views::View overrides: |
| 49 virtual gfx::Size GetPreferredSize() OVERRIDE; | 49 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 50 | 50 |
| 51 // ui::AnimationDelegate overrides: | 51 // ui::AnimationDelegate overrides: |
| 52 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 52 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
| 53 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 53 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 54 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; | 54 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; |
| 55 | 55 |
| 56 // views::WidgetObserver override: | 56 // views::WidgetObserver override: |
| 57 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 57 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
| 58 | 58 |
| 59 // TouchableLocationBarView. | 59 // TouchableLocationBarView. |
| 60 virtual int GetBuiltInHorizontalPadding() const OVERRIDE; | 60 virtual int GetBuiltInHorizontalPadding() const OVERRIDE; |
| 61 | 61 |
| 62 protected: | |
| 63 virtual SkColor button_border_color() const; | |
|
sky
2012/08/07 03:33:00
virtual methods shouldn't be named named with unix
Greg Billock
2012/08/07 19:29:04
Done.
| |
| 64 virtual SkColor gradient_top_color() const; | |
| 65 virtual SkColor gradient_bottom_color() const; | |
| 66 virtual void OnClick(); | |
| 67 | |
| 62 private: | 68 private: |
| 63 // views::ImageView overrides: | 69 // views::ImageView overrides: |
| 64 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 70 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 65 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 71 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 66 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 72 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 67 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 73 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
| 68 | 74 |
| 69 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 75 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
| 70 | 76 |
| 71 views::Widget* bubble_widget_; | 77 views::Widget* bubble_widget_; |
| 72 | 78 |
| 73 // The owning LocationBarView. | 79 // The owning LocationBarView. |
| 74 LocationBarView* parent_; | 80 LocationBarView* parent_; |
| 75 | 81 |
| 76 scoped_ptr<ui::SlideAnimation> slide_animator_; | 82 scoped_ptr<ui::SlideAnimation> slide_animator_; |
| 77 string16 animated_text_; | 83 string16 animated_text_; |
| 78 bool pause_animation_; | 84 bool pause_animation_; |
| 79 int text_size_; | 85 int text_size_; |
| 80 int visible_text_size_; | 86 int visible_text_size_; |
| 81 gfx::Insets saved_insets_; | 87 gfx::Insets saved_insets_; |
| 82 | 88 |
| 83 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); | 89 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); |
| 84 }; | 90 }; |
| 85 | 91 |
| 86 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 92 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| OLD | NEW |