| Index: chrome/browser/ui/views/location_bar/content_setting_image_view.h
|
| diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
|
| index c04add53d4f728b0ef53736832eda80cbb8a46f4..4db6319768650860058e7712116568a440f33266 100644
|
| --- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
|
| +++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
|
| @@ -12,6 +12,7 @@
|
| #include "components/content_settings/core/common/content_settings_types.h"
|
| #include "ui/gfx/animation/animation_delegate.h"
|
| #include "ui/gfx/animation/slide_animation.h"
|
| +#include "ui/views/animation/ink_drop_host.h"
|
| #include "ui/views/painter.h"
|
| #include "ui/views/view.h"
|
| #include "ui/views/widget/widget_observer.h"
|
| @@ -28,7 +29,9 @@ class FontList;
|
| }
|
|
|
| namespace views {
|
| +class BubbleDelegateView;
|
| class ImageView;
|
| +class InkDropDelegate;
|
| class Label;
|
| }
|
|
|
| @@ -37,6 +40,7 @@ class Label;
|
| // blocking, geolocation).
|
| class ContentSettingImageView : public IconLabelBubbleView,
|
| public gfx::AnimationDelegate,
|
| + public views::InkDropHost,
|
| public views::WidgetObserver {
|
| public:
|
| // ContentSettingImageView takes ownership of its |image_model|.
|
| @@ -71,24 +75,44 @@ class ContentSettingImageView : public IconLabelBubbleView,
|
|
|
| // views::View:
|
| const char* GetClassName() const override;
|
| + void Layout() override;
|
| + void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
|
| bool OnMousePressed(const ui::MouseEvent& event) override;
|
| void OnMouseReleased(const ui::MouseEvent& event) override;
|
| void OnGestureEvent(ui::GestureEvent* event) override;
|
| void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override;
|
|
|
| + // views::InkDropHost:
|
| + void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| + void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| + gfx::Point CalculateInkDropCenter() const override;
|
| + bool ShouldShowInkDropHover() const override;
|
| +
|
| // views::WidgetObserver:
|
| void OnWidgetDestroying(views::Widget* widget) override;
|
| + void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override;
|
|
|
| void OnClick();
|
|
|
| void UpdateImage();
|
|
|
| + // Returns true if a related bubble is showing.
|
| + bool IsBubbleShowing() const;
|
| +
|
| LocationBarView* parent_; // Weak, owns us.
|
| scoped_ptr<ContentSettingImageModel> content_setting_image_model_;
|
| gfx::SlideAnimation slide_animator_;
|
| bool pause_animation_;
|
| double pause_animation_state_;
|
| - views::Widget* bubble_widget_;
|
| + views::BubbleDelegateView* bubble_view_;
|
| +
|
| + // This is used to check if the bubble was showing during the mouse pressed
|
| + // event. If this is true then the mouse released event is ignored to prevent
|
| + // the bubble from reshowing.
|
| + bool suppress_mouse_released_action_;
|
| +
|
| + // Animation delegate for the ink drop ripple effect.
|
| + scoped_ptr<views::InkDropDelegate> ink_drop_delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView);
|
| };
|
|
|