| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // The opacity of the ink drop when it is not visible. | 40 // The opacity of the ink drop when it is not visible. |
| 41 static const float kHiddenOpacity; | 41 static const float kHiddenOpacity; |
| 42 | 42 |
| 43 // The opacity of the ink drop when it is visible. | 43 // The opacity of the ink drop when it is visible. |
| 44 static const float kVisibleOpacity; | 44 static const float kVisibleOpacity; |
| 45 | 45 |
| 46 InkDropAnimation(); | 46 InkDropAnimation(); |
| 47 virtual ~InkDropAnimation(); | 47 virtual ~InkDropAnimation(); |
| 48 | 48 |
| 49 // In the event that an animation is in progress for ink drop state 's1' and |
| 50 // an animation to a new state 's2' is triggered, then |
| 51 // AnimationEnded(s1, PRE_EMPTED) will be called before |
| 52 // AnimationStarted(s2). |
| 49 void set_observer(InkDropAnimationObserver* observer) { | 53 void set_observer(InkDropAnimationObserver* observer) { |
| 50 observer_ = observer; | 54 observer_ = observer; |
| 51 } | 55 } |
| 52 | 56 |
| 53 // Animates from the current InkDropState to the new |ink_drop_state|. | 57 // Animates from the current InkDropState to the new |ink_drop_state|. |
| 54 // | 58 // |
| 55 // NOTE: GetTargetInkDropState() should return the new |ink_drop_state| value | 59 // NOTE: GetTargetInkDropState() should return the new |ink_drop_state| value |
| 56 // to any observers being notified as a result of the call. | 60 // to any observers being notified as a result of the call. |
| 57 void AnimateToState(InkDropState ink_drop_state); | 61 void AnimateToState(InkDropState ink_drop_state); |
| 58 | 62 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 InkDropState target_ink_drop_state_; | 113 InkDropState target_ink_drop_state_; |
| 110 | 114 |
| 111 InkDropAnimationObserver* observer_; | 115 InkDropAnimationObserver* observer_; |
| 112 | 116 |
| 113 DISALLOW_COPY_AND_ASSIGN(InkDropAnimation); | 117 DISALLOW_COPY_AND_ASSIGN(InkDropAnimation); |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 } // namespace views | 120 } // namespace views |
| 117 | 121 |
| 118 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ | 122 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_ |
| OLD | NEW |