OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_H_ |
| 6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_H_ |
| 7 |
| 8 #include "ui/views/animation/ink_drop.h" |
| 9 |
| 10 namespace views { |
| 11 namespace test { |
| 12 |
| 13 // A InkDrop test double that tracks the last requested state changes. |
| 14 // |
| 15 // NOTE: This does not auto transition between any of the InkDropStates. |
| 16 // |
| 17 class TestInkDrop : public InkDrop { |
| 18 public: |
| 19 TestInkDrop(); |
| 20 ~TestInkDrop() override; |
| 21 |
| 22 bool is_hovered() const { return is_hovered_; } |
| 23 |
| 24 InkDropState GetTargetInkDropState() const override; |
| 25 void AnimateToState(InkDropState ink_drop_state) override; |
| 26 void SnapToActivated() override; |
| 27 void SetHovered(bool is_hovered) override; |
| 28 void SetFocused(bool is_focused) override; |
| 29 |
| 30 private: |
| 31 InkDropState state_; |
| 32 bool is_hovered_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(TestInkDrop); |
| 35 }; |
| 36 |
| 37 } // namespace test |
| 38 } // namespace views |
| 39 |
| 40 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_H_ |
OLD | NEW |