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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/common/content_settings_types.h" | 9 #include "chrome/common/content_settings_types.h" |
10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 // The ContentSettingImageView displays an icon and optional text label for | 32 // The ContentSettingImageView displays an icon and optional text label for |
33 // various content settings affordances in the location bar (i.e. plugin | 33 // various content settings affordances in the location bar (i.e. plugin |
34 // blocking, geolocation). | 34 // blocking, geolocation). |
35 class ContentSettingImageView : public gfx::AnimationDelegate, | 35 class ContentSettingImageView : public gfx::AnimationDelegate, |
36 public views::View, | 36 public views::View, |
37 public views::WidgetObserver { | 37 public views::WidgetObserver { |
38 public: | 38 public: |
39 ContentSettingImageView(ContentSettingsType content_type, | 39 ContentSettingImageView(ContentSettingsType content_type, |
40 LocationBarView* parent, | 40 LocationBarView* parent, |
41 const gfx::FontList& font_list, | 41 const gfx::FontList& font_list, |
42 int font_y_offset, | |
43 SkColor text_color, | 42 SkColor text_color, |
44 SkColor parent_background_color); | 43 SkColor parent_background_color); |
45 virtual ~ContentSettingImageView(); | 44 virtual ~ContentSettingImageView(); |
46 | 45 |
47 // Updates the decoration from the shown WebContents. | 46 // Updates the decoration from the shown WebContents. |
48 void UpdatePreLayout(content::WebContents* web_contents); | 47 void UpdatePreLayout(content::WebContents* web_contents); |
49 | 48 |
50 // Performs any updates which depend on the image having already been laid out | 49 // Performs any updates which depend on the image having already been laid out |
51 // by the owning LocationBarView. | 50 // by the owning LocationBarView. |
52 void UpdatePostLayout(content::WebContents* web_contents); | 51 void UpdatePostLayout(content::WebContents* web_contents); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 views::Label* text_label_; | 97 views::Label* text_label_; |
99 gfx::SlideAnimation slide_animator_; | 98 gfx::SlideAnimation slide_animator_; |
100 bool pause_animation_; | 99 bool pause_animation_; |
101 double pause_animation_state_; | 100 double pause_animation_state_; |
102 views::Widget* bubble_widget_; | 101 views::Widget* bubble_widget_; |
103 | 102 |
104 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 103 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
105 }; | 104 }; |
106 | 105 |
107 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 106 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |