| Index: ui/views/animation/ink_drop_host_view.h
|
| diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h
|
| index e4ebe6d3b6d43256126325fccd46cdcef8a0dc12..f54b4f30b3ecd4dda4d61091511ac0fa91341ed6 100644
|
| --- a/ui/views/animation/ink_drop_host_view.h
|
| +++ b/ui/views/animation/ink_drop_host_view.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/gfx/geometry/size.h"
|
| +#include "ui/views/animation/ink_drop_delegate.h"
|
| #include "ui/views/animation/ink_drop_host.h"
|
| #include "ui/views/view.h"
|
|
|
| @@ -18,11 +19,8 @@ class InkDropRipple;
|
| class InkDropHover;
|
|
|
| // A view that provides InkDropHost functionality.
|
| -class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost {
|
| +class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost {
|
| public:
|
| - InkDropHostView();
|
| - ~InkDropHostView() override;
|
| -
|
| // Overridden from views::InkDropHost:
|
| void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| @@ -31,16 +29,34 @@ class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost {
|
|
|
| void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; }
|
|
|
| + InkDropDelegate* ink_drop_delegate() { return ink_drop_delegate_.get(); }
|
| +
|
| protected:
|
| + InkDropHostView();
|
| + ~InkDropHostView() override;
|
| +
|
| static const int kInkDropSmallCornerRadius;
|
|
|
| + // View
|
| + void OnFocus() override;
|
| + void OnBlur() override;
|
| +
|
| // Overrideable methods to allow views to provide minor tweaks to the default
|
| // ink drop.
|
| virtual gfx::Point GetInkDropCenter() const;
|
| virtual SkColor GetInkDropBaseColor() const;
|
|
|
| + // Should return true if the ink drop is also used to depict focus.
|
| + virtual bool ShouldShowInkDropForFocus() const;
|
| +
|
| + void set_ink_drop_delegate(std::unique_ptr<InkDropDelegate> delegate) {
|
| + ink_drop_delegate_ = std::move(delegate);
|
| + }
|
| +
|
| private:
|
| + std::unique_ptr<InkDropDelegate> ink_drop_delegate_;
|
| gfx::Size ink_drop_size_;
|
| + bool destroying_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
|
| };
|
|
|