| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANIMATION_CONTROLLER_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "ui/compositor/layer_tree_owner.h" | 12 #include "ui/compositor/layer_tree_owner.h" |
| 13 #include "ui/events/event_handler.h" | 13 #include "ui/events/event_handler.h" |
| 14 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
| 15 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
| 16 #include "ui/views/animation/ink_drop_state.h" | 16 #include "ui/views/animation/ink_drop_state.h" |
| 17 #include "ui/views/views_export.h" | 17 #include "ui/views/views_export.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 class Layer; | 20 class Layer; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 | 24 |
| 25 // Pure virtual base class that manages the lifetime and state of an ink drop | 25 // Pure virtual base class that manages the lifetime and state of an ink drop |
| 26 // animation as well as visual hover state feedback. | 26 // ripple as well as visual hover state feedback. |
| 27 class VIEWS_EXPORT InkDropAnimationController { | 27 class VIEWS_EXPORT InkDropAnimationController { |
| 28 public: | 28 public: |
| 29 virtual ~InkDropAnimationController() {} | 29 virtual ~InkDropAnimationController() {} |
| 30 | 30 |
| 31 // Gets the target state of the ink drop. | 31 // Gets the target state of the ink drop. |
| 32 virtual InkDropState GetTargetInkDropState() const = 0; | 32 virtual InkDropState GetTargetInkDropState() const = 0; |
| 33 | 33 |
| 34 // Returns true when the ripple is visible, including when animating to | 34 // Returns true when the ripple is visible, including when animating to |
| 35 // HIDDEN. | 35 // HIDDEN. |
| 36 virtual bool IsVisible() const = 0; | 36 virtual bool IsVisible() const = 0; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 50 protected: | 50 protected: |
| 51 InkDropAnimationController() {} | 51 InkDropAnimationController() {} |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); | 54 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace views | 57 } // namespace views |
| 58 | 58 |
| 59 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 59 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |