Chromium Code Reviews| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // Gets the target state of the ink drop. | 30 // Gets the target state of the ink drop. |
| 31 virtual InkDropState GetTargetInkDropState() const = 0; | 31 virtual InkDropState GetTargetInkDropState() const = 0; |
| 32 | 32 |
| 33 // Returns true when the ripple is visible, including when animating to | 33 // Returns true when the ripple is visible, including when animating to |
| 34 // HIDDEN. | 34 // HIDDEN. |
| 35 virtual bool IsVisible() const = 0; | 35 virtual bool IsVisible() const = 0; |
| 36 | 36 |
| 37 // Animates from the current InkDropState to |ink_drop_state|. | 37 // Animates from the current InkDropState to |ink_drop_state|. |
| 38 virtual void AnimateToState(InkDropState ink_drop_state) = 0; | 38 virtual void AnimateToState(InkDropState ink_drop_state) = 0; |
| 39 | 39 |
| 40 // Immediately snaps the InkDropState to ACTIVATED. | |
|
varkha
2016/03/11 17:57:17
Maybe some comment why it is necessary to treat AC
bruthig
2016/03/11 21:58:20
Done.
| |
| 41 virtual void SnapToActivated() = 0; | |
| 42 | |
| 40 // Enables or disables the hover state. | 43 // Enables or disables the hover state. |
| 41 virtual void SetHovered(bool is_hovered) = 0; | 44 virtual void SetHovered(bool is_hovered) = 0; |
| 42 | 45 |
| 43 protected: | 46 protected: |
| 44 InkDropAnimationController() {} | 47 InkDropAnimationController() {} |
| 45 | 48 |
| 46 private: | 49 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); | 50 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 } // namespace views | 53 } // namespace views |
| 51 | 54 |
| 52 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 55 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |