| 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_IMPL_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public InkDropRippleObserver, | 34 public InkDropRippleObserver, |
| 35 public InkDropHighlightObserver { | 35 public InkDropHighlightObserver { |
| 36 public: | 36 public: |
| 37 // Constructs an ink drop that will attach the ink drop to the given | 37 // Constructs an ink drop that will attach the ink drop to the given |
| 38 // |ink_drop_host|. | 38 // |ink_drop_host|. |
| 39 explicit InkDropImpl(InkDropHost* ink_drop_host); | 39 explicit InkDropImpl(InkDropHost* ink_drop_host); |
| 40 ~InkDropImpl() override; | 40 ~InkDropImpl() override; |
| 41 | 41 |
| 42 // InkDrop: | 42 // InkDrop: |
| 43 InkDropState GetTargetInkDropState() const override; | 43 InkDropState GetTargetInkDropState() const override; |
| 44 bool IsVisible() const override; | |
| 45 void AnimateToState(InkDropState ink_drop_state) override; | 44 void AnimateToState(InkDropState ink_drop_state) override; |
| 46 void SnapToActivated() override; | 45 void SnapToActivated() override; |
| 47 void SetHovered(bool is_hovered) override; | 46 void SetHovered(bool is_hovered) override; |
| 48 void SetFocused(bool is_focused) override; | 47 void SetFocused(bool is_focused) override; |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 friend class test::InkDropImplTestApi; | 50 friend class test::InkDropImplTestApi; |
| 52 | 51 |
| 53 // Destroys |ink_drop_ripple_| if it's targeted to the HIDDEN state. | 52 // Destroys |ink_drop_ripple_| if it's targeted to the HIDDEN state. |
| 54 void DestroyHiddenTargetedAnimations(); | 53 void DestroyHiddenTargetedAnimations(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // The timer used to delay the highlight fade in after an ink drop ripple | 143 // The timer used to delay the highlight fade in after an ink drop ripple |
| 145 // animation. | 144 // animation. |
| 146 std::unique_ptr<base::Timer> highlight_after_ripple_timer_; | 145 std::unique_ptr<base::Timer> highlight_after_ripple_timer_; |
| 147 | 146 |
| 148 DISALLOW_COPY_AND_ASSIGN(InkDropImpl); | 147 DISALLOW_COPY_AND_ASSIGN(InkDropImpl); |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 } // namespace views | 150 } // namespace views |
| 152 | 151 |
| 153 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ | 152 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ |
| OLD | NEW |