| 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_TEST_TEST_INK_DROP_DELEGATE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_DELEGATE_H_ |
| 6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_DELEGATE_H_ | 6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "ui/views/animation/ink_drop_delegate.h" | 10 #include "ui/views/animation/ink_drop_delegate.h" |
| 10 | 11 |
| 11 namespace views { | 12 namespace views { |
| 12 namespace test { | 13 namespace test { |
| 13 | 14 |
| 14 class TestInkDropDelegate : public InkDropDelegate { | 15 class TestInkDropDelegate : public InkDropDelegate { |
| 15 public: | 16 public: |
| 16 TestInkDropDelegate(); | 17 TestInkDropDelegate(); |
| 17 ~TestInkDropDelegate() override; | 18 ~TestInkDropDelegate() override; |
| 18 | 19 |
| 19 bool is_hovered() const { return is_hovered_; } | 20 bool is_hovered() const { return is_hovered_; } |
| 20 | 21 |
| 21 // InkDropDelegate: | 22 // InkDropDelegate: |
| 22 void OnAction(InkDropState state) override; | 23 void OnAction(InkDropState state) override; |
| 23 void SnapToActivated() override; | 24 void SnapToActivated() override; |
| 24 void SetHovered(bool is_hovered) override; | 25 void SetHovered(bool is_hovered) override; |
| 25 InkDropState GetTargetInkDropState() const override; | 26 InkDropState GetTargetInkDropState() const override; |
| 26 InkDrop* GetInkDrop() override; | 27 InkDrop* GetInkDrop() override; |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 InkDropState state_; | 30 InkDropState state_; |
| 30 | 31 |
| 31 bool is_hovered_; | 32 bool is_hovered_; |
| 32 | 33 |
| 34 std::unique_ptr<InkDrop> ink_drop_; |
| 35 |
| 33 DISALLOW_COPY_AND_ASSIGN(TestInkDropDelegate); | 36 DISALLOW_COPY_AND_ASSIGN(TestInkDropDelegate); |
| 34 }; | 37 }; |
| 35 | 38 |
| 36 } // namespace test | 39 } // namespace test |
| 37 } // namespace views | 40 } // namespace views |
| 38 | 41 |
| 39 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_DELEGATE_H_ | 42 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_DELEGATE_H_ |
| OLD | NEW |