| 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_INK_DROP_ANIMATION_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gfx/geometry/point.h" | 9 #include "ui/gfx/geometry/point.h" |
| 10 #include "ui/views/animation/ink_drop_animation_observer.h" | 10 #include "ui/views/animation/ink_drop_animation_observer.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void AnimateToState(InkDropState ink_drop_state); | 57 void AnimateToState(InkDropState ink_drop_state); |
| 58 | 58 |
| 59 InkDropState target_ink_drop_state() const { return target_ink_drop_state_; } | 59 InkDropState target_ink_drop_state() const { return target_ink_drop_state_; } |
| 60 | 60 |
| 61 // Immediately aborts all in-progress animations and hides the ink drop. | 61 // Immediately aborts all in-progress animations and hides the ink drop. |
| 62 // | 62 // |
| 63 // NOTE: This will NOT raise InkDropAnimation(Started|Ended) events for the | 63 // NOTE: This will NOT raise InkDropAnimation(Started|Ended) events for the |
| 64 // state transition to HIDDEN! | 64 // state transition to HIDDEN! |
| 65 void HideImmediately(); | 65 void HideImmediately(); |
| 66 | 66 |
| 67 // Immediately snaps the ink drop to the ACTIVATED target state. All pending |
| 68 // animations are aborted. Events will be raised for the pending animations |
| 69 // as well as the transition to the ACTIVATED state. |
| 70 virtual void SnapToActivated(); |
| 71 |
| 67 // The root Layer that can be added in to a Layer tree. | 72 // The root Layer that can be added in to a Layer tree. |
| 68 virtual ui::Layer* GetRootLayer() = 0; | 73 virtual ui::Layer* GetRootLayer() = 0; |
| 69 | 74 |
| 70 // Returns true when the ripple is visible. This is different from checking if | 75 // Returns true when the ripple is visible. This is different from checking if |
| 71 // the ink_drop_state() == HIDDEN because the ripple may be visible while it | 76 // the ink_drop_state() == HIDDEN because the ripple may be visible while it |
| 72 // animates to the target HIDDEN state. | 77 // animates to the target HIDDEN state. |
| 73 virtual bool IsVisible() const = 0; | 78 virtual bool IsVisible() const = 0; |
| 74 | 79 |
| 75 protected: | 80 protected: |
| 76 // Animates the ripple from the |old_ink_drop_state| to the | 81 // Animates the ripple from the |old_ink_drop_state| to the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 104 InkDropState target_ink_drop_state_; | 109 InkDropState target_ink_drop_state_; |
| 105 | 110 |
| 106 InkDropAnimationObserver* observer_; | 111 InkDropAnimationObserver* observer_; |
| 107 | 112 |
| 108 DISALLOW_COPY_AND_ASSIGN(InkDropAnimation); | 113 DISALLOW_COPY_AND_ASSIGN(InkDropAnimation); |
| 109 }; | 114 }; |
| 110 | 115 |
| 111 } // namespace views | 116 } // namespace views |
| 112 | 117 |
| 113 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ | 118 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ |
| OLD | NEW |