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" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 void OnFocus() override; | 100 void OnFocus() override; |
101 void OnBlur() override; | 101 void OnBlur() override; |
102 void OnMouseEvent(ui::MouseEvent* event) override; | 102 void OnMouseEvent(ui::MouseEvent* event) override; |
103 | 103 |
104 // Overrideable methods to allow views to provide minor tweaks to the default | 104 // Overrideable methods to allow views to provide minor tweaks to the default |
105 // ink drop. | 105 // ink drop. |
106 virtual SkColor GetInkDropBaseColor() const; | 106 virtual SkColor GetInkDropBaseColor() const; |
107 | 107 |
108 // Subclasses can override to return a mask for the ink drop. By default, | 108 // Subclasses can override to return a mask for the ink drop. By default, |
109 // returns nullptr (i.e no mask). | 109 // returns nullptr (i.e no mask). |
110 // TODO(brutig): InkDropMasks do not currently work on Windows. See | |
bruthig
2017/04/21 15:05:10
sp nit: brutig -> bruthig
spqchan
2017/04/27 21:40:06
whoops, sorry
| |
111 // crbug.com/713359. | |
110 virtual std::unique_ptr<views::InkDropMask> CreateInkDropMask() const; | 112 virtual std::unique_ptr<views::InkDropMask> CreateInkDropMask() const; |
111 | 113 |
112 // Provides access to |ink_drop_|. Implements lazy initialization of | 114 // Provides access to |ink_drop_|. Implements lazy initialization of |
113 // |ink_drop_| so as to avoid virtual method calls during construction since | 115 // |ink_drop_| so as to avoid virtual method calls during construction since |
114 // subclasses should be able to call SetInkDropMode() during construction. | 116 // subclasses should be able to call SetInkDropMode() during construction. |
115 InkDrop* GetInkDrop(); | 117 InkDrop* GetInkDrop(); |
116 | 118 |
117 // Returns an InkDropImpl configured to work well with a | 119 // Returns an InkDropImpl configured to work well with a |
118 // flood-fill ink drop ripple. | 120 // flood-fill ink drop ripple. |
119 std::unique_ptr<InkDropImpl> CreateDefaultFloodFillInkDropImpl(); | 121 std::unique_ptr<InkDropImpl> CreateDefaultFloodFillInkDropImpl(); |
(...skipping 28 matching lines...) Expand all Loading... | |
148 | 150 |
149 bool destroying_; | 151 bool destroying_; |
150 | 152 |
151 std::unique_ptr<views::InkDropMask> ink_drop_mask_; | 153 std::unique_ptr<views::InkDropMask> ink_drop_mask_; |
152 | 154 |
153 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); | 155 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); |
154 }; | 156 }; |
155 } // namespace views | 157 } // namespace views |
156 | 158 |
157 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ | 159 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ |
OLD | NEW |