Index: ui/views/controls/button/custom_button.cc |
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc |
index 62fec14cbce91d26834649fe869231a99e9dbf97..db3fb5d7937355a3e247158834c9800bb7b3183f 100644 |
--- a/ui/views/controls/button/custom_button.cc |
+++ b/ui/views/controls/button/custom_button.cc |
@@ -331,6 +331,26 @@ void CustomButton::AnimationProgressed(const gfx::Animation* animation) { |
} |
//////////////////////////////////////////////////////////////////////////////// |
+// CustomButton, views::InkDropHost implementation: |
+ |
+void CustomButton::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
+ SetPaintToLayer(true); |
+ SetFillsBoundsOpaquely(false); |
sadrul
2016/01/06 19:18:45
It shouldn't happen here. At most, this should DCH
|
+ layer()->Add(ink_drop_layer); |
+ layer()->StackAtBottom(ink_drop_layer); |
+} |
+ |
+void CustomButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
+ layer()->Remove(ink_drop_layer); |
+ SetFillsBoundsOpaquely(true); |
+ SetPaintToLayer(false); |
+} |
+ |
+gfx::Point CustomButton::CalculateInkDropCenter() const { |
+ return GetLocalBounds().CenterPoint(); |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
// CustomButton, protected: |
CustomButton::CustomButton(ButtonListener* listener) |