OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ |
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
12 #include "ui/views/animation/ink_drop_delegate.h" | 12 #include "ui/views/animation/ink_drop_delegate.h" |
13 #include "ui/views/animation/ink_drop_host.h" | 13 #include "ui/views/animation/ink_drop_host.h" |
14 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 | 17 |
18 class InkDropRipple; | 18 class InkDropRipple; |
19 class InkDropHover; | 19 class InkDropHighlight; |
20 | 20 |
21 // A view that provides InkDropHost functionality. | 21 // A view that provides InkDropHost functionality. |
22 class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost { | 22 class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost { |
23 public: | 23 public: |
24 // Overridden from views::InkDropHost: | 24 // Overridden from views::InkDropHost: |
25 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 25 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
26 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 26 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
27 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; | 27 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; |
28 std::unique_ptr<InkDropHover> CreateInkDropHover() const override; | 28 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; |
29 | 29 |
30 void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; } | 30 void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; } |
31 | 31 |
32 InkDropDelegate* ink_drop_delegate() { return ink_drop_delegate_.get(); } | 32 InkDropDelegate* ink_drop_delegate() { return ink_drop_delegate_.get(); } |
33 | 33 |
34 protected: | 34 protected: |
35 InkDropHostView(); | 35 InkDropHostView(); |
36 ~InkDropHostView() override; | 36 ~InkDropHostView() override; |
37 | 37 |
38 static const int kInkDropSmallCornerRadius; | 38 static const int kInkDropSmallCornerRadius; |
(...skipping 17 matching lines...) Expand all Loading... |
56 private: | 56 private: |
57 std::unique_ptr<InkDropDelegate> ink_drop_delegate_; | 57 std::unique_ptr<InkDropDelegate> ink_drop_delegate_; |
58 gfx::Size ink_drop_size_; | 58 gfx::Size ink_drop_size_; |
59 bool destroying_; | 59 bool destroying_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); | 61 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); |
62 }; | 62 }; |
63 } // namespace views | 63 } // namespace views |
64 | 64 |
65 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ | 65 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ |
OLD | NEW |