| 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_IMPL_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_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 "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 InkDropState GetTargetInkDropState() const override; | 37 InkDropState GetTargetInkDropState() const override; |
| 38 bool IsVisible() const override; | 38 bool IsVisible() const override; |
| 39 void AnimateToState(InkDropState ink_drop_state) override; | 39 void AnimateToState(InkDropState ink_drop_state) override; |
| 40 void SnapToActivated() override; | 40 void SnapToActivated() override; |
| 41 void SetHovered(bool is_hovered) override; | 41 void SetHovered(bool is_hovered) override; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 friend class InkDropAnimationControllerFactoryTest; | 44 friend class InkDropAnimationControllerFactoryTest; |
| 45 friend class InkDropAnimationControllerImplTest; | 45 friend class InkDropAnimationControllerImplTest; |
| 46 | 46 |
| 47 // Forcibly transition to the HIDDEN state if completing the current animation | 47 // Destroys |ink_drop_animation_| if it's targeted to the HIDDEN state. |
| 48 // sequence would eventually be HIDDEN. | 48 void DestroyHiddenTargetedAnimations(); |
| 49 void CompleteHiddenTargetedAnimations(); | |
| 50 | 49 |
| 51 // Creates a new InkDropAnimation and sets it to |ink_drop_animation_|. If | 50 // Creates a new InkDropAnimation and sets it to |ink_drop_animation_|. If |
| 52 // |ink_drop_animation_| wasn't null then it will be destroyed using | 51 // |ink_drop_animation_| wasn't null then it will be destroyed using |
| 53 // DestroyInkDropAnimation(). | 52 // DestroyInkDropAnimation(). |
| 54 void CreateInkDropAnimation(); | 53 void CreateInkDropAnimation(); |
| 55 | 54 |
| 56 // Destroys the current |ink_drop_animation_|. | 55 // Destroys the current |ink_drop_animation_|. |
| 57 void DestroyInkDropAnimation(); | 56 void DestroyInkDropAnimation(); |
| 58 | 57 |
| 59 // Creates a new InkDropHover and sets it to |hover_|. If |hover_| wasn't null | 58 // Creates a new InkDropHover and sets it to |hover_|. If |hover_| wasn't null |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 108 |
| 110 // The timer used to delay the hover fade in after an ink drop animation. | 109 // The timer used to delay the hover fade in after an ink drop animation. |
| 111 scoped_ptr<base::Timer> hover_after_animation_timer_; | 110 scoped_ptr<base::Timer> hover_after_animation_timer_; |
| 112 | 111 |
| 113 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); | 112 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 } // namespace views | 115 } // namespace views |
| 117 | 116 |
| 118 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ | 117 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |