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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" | 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
11 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" | 11 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
12 #include "components/content_settings/core/common/content_settings_types.h" | 12 #include "components/content_settings/core/common/content_settings_types.h" |
13 #include "ui/gfx/animation/animation_delegate.h" | 13 #include "ui/gfx/animation/animation_delegate.h" |
14 #include "ui/gfx/animation/slide_animation.h" | 14 #include "ui/gfx/animation/slide_animation.h" |
15 #include "ui/views/painter.h" | 15 #include "ui/views/painter.h" |
16 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
17 #include "ui/views/widget/widget_observer.h" | 17 #include "ui/views/widget/widget_observer.h" |
18 | 18 |
| 19 class ContentSettingBubbleContents; |
19 class ContentSettingImageModel; | 20 class ContentSettingImageModel; |
20 class LocationBarView; | 21 class LocationBarView; |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class WebContents; | 24 class WebContents; |
24 } | 25 } |
25 | 26 |
26 namespace gfx { | 27 namespace gfx { |
27 class FontList; | 28 class FontList; |
28 } | 29 } |
29 | 30 |
30 namespace views { | 31 namespace views { |
31 class BubbleDelegateView; | |
32 class ImageView; | 32 class ImageView; |
33 class InkDropDelegate; | 33 class InkDropDelegate; |
34 class Label; | 34 class Label; |
35 } | 35 } |
36 | 36 |
37 // The ContentSettingImageView displays an icon and optional text label for | 37 // The ContentSettingImageView displays an icon and optional text label for |
38 // various content settings affordances in the location bar (i.e. plugin | 38 // various content settings affordances in the location bar (i.e. plugin |
39 // blocking, geolocation). | 39 // blocking, geolocation). |
40 class ContentSettingImageView : public IconLabelBubbleView, | 40 class ContentSettingImageView : public IconLabelBubbleView, |
41 public gfx::AnimationDelegate, | 41 public gfx::AnimationDelegate, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void UpdateImage(); | 89 void UpdateImage(); |
90 | 90 |
91 // Returns true if a related bubble is showing. | 91 // Returns true if a related bubble is showing. |
92 bool IsBubbleShowing() const; | 92 bool IsBubbleShowing() const; |
93 | 93 |
94 LocationBarView* parent_; // Weak, owns us. | 94 LocationBarView* parent_; // Weak, owns us. |
95 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 95 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
96 gfx::SlideAnimation slide_animator_; | 96 gfx::SlideAnimation slide_animator_; |
97 bool pause_animation_; | 97 bool pause_animation_; |
98 double pause_animation_state_; | 98 double pause_animation_state_; |
99 views::BubbleDelegateView* bubble_view_; | 99 ContentSettingBubbleContents* bubble_view_; |
100 | 100 |
101 // This is used to check if the bubble was showing during the mouse pressed | 101 // This is used to check if the bubble was showing during the mouse pressed |
102 // event. If this is true then the mouse released event is ignored to prevent | 102 // event. If this is true then the mouse released event is ignored to prevent |
103 // the bubble from reshowing. | 103 // the bubble from reshowing. |
104 bool suppress_mouse_released_action_; | 104 bool suppress_mouse_released_action_; |
105 | 105 |
106 // Animation delegate for the ink drop ripple effect. | 106 // Animation delegate for the ink drop ripple effect. |
107 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 107 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 109 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 112 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |