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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 // Constructs an ink drop controller that will attach the ink drop to the | 31 // Constructs an ink drop controller that will attach the ink drop to the |
32 // given |ink_drop_host|. | 32 // given |ink_drop_host|. |
33 InkDropAnimationControllerImpl(InkDropHost* ink_drop_host, | 33 InkDropAnimationControllerImpl(InkDropHost* ink_drop_host, |
34 InkDropConsumer* ink_drop_consumer); | 34 InkDropConsumer* ink_drop_consumer); |
35 ~InkDropAnimationControllerImpl() override; | 35 ~InkDropAnimationControllerImpl() override; |
36 | 36 |
37 // InkDropAnimationController: | 37 // InkDropAnimationController: |
38 InkDropState GetInkDropState() const override; | 38 InkDropState GetInkDropState() const override; |
39 void AnimateToState(InkDropState ink_drop_state) override; | 39 void AnimateToState(InkDropState ink_drop_state) override; |
| 40 bool WillAutoAnimateToHidden() const override; |
40 void SetHovered(bool is_hovered) override; | 41 void SetHovered(bool is_hovered) override; |
41 bool IsHovered() const override; | 42 bool IsHovered() const override; |
42 gfx::Size GetInkDropLargeSize() const override; | 43 gfx::Size GetInkDropLargeSize() const override; |
43 void SetInkDropSize(const gfx::Size& large_size, | 44 void SetInkDropSize(const gfx::Size& large_size, |
44 int large_corner_radius, | 45 int large_corner_radius, |
45 const gfx::Size& small_size, | 46 const gfx::Size& small_size, |
46 int small_corner_radius) override; | 47 int small_corner_radius) override; |
47 void SetInkDropCenter(const gfx::Point& center_point) override; | 48 void SetInkDropCenter(const gfx::Point& center_point) override; |
48 | 49 |
49 private: | 50 private: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // from the InkDropHost. | 116 // from the InkDropHost. |
116 scoped_ptr<ui::Layer> root_layer_; | 117 scoped_ptr<ui::Layer> root_layer_; |
117 | 118 |
118 // The current InkDropHover. Lazily created using CreateInkDropHover(); | 119 // The current InkDropHover. Lazily created using CreateInkDropHover(); |
119 scoped_ptr<InkDropHover> hover_; | 120 scoped_ptr<InkDropHover> hover_; |
120 | 121 |
121 // The current InkDropAnimation. Created on demand using | 122 // The current InkDropAnimation. Created on demand using |
122 // CreateInkDropAnimation(). | 123 // CreateInkDropAnimation(). |
123 scoped_ptr<InkDropAnimation> ink_drop_animation_; | 124 scoped_ptr<InkDropAnimation> ink_drop_animation_; |
124 | 125 |
| 126 // Tracks whether the InkDropAnimation can be destroyed when a |
| 127 // InkDropState::HIDDEN animation completes. |
| 128 bool can_destroy_after_hidden_animation_; |
| 129 |
125 // The timer used to delay the hover fade in after an ink drop animation. | 130 // The timer used to delay the hover fade in after an ink drop animation. |
126 scoped_ptr<base::Timer> hover_after_animation_timer_; | 131 scoped_ptr<base::Timer> hover_after_animation_timer_; |
127 | 132 |
128 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); | 133 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); |
129 }; | 134 }; |
130 | 135 |
131 } // namespace views | 136 } // namespace views |
132 | 137 |
133 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ | 138 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ |
OLD | NEW |