| 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_RIPPLE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_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_ripple_observer.h" | 10 #include "ui/views/animation/ink_drop_ripple_observer.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual void SnapToActivated(); | 73 virtual void SnapToActivated(); |
| 74 | 74 |
| 75 // The root Layer that can be added in to a Layer tree. | 75 // The root Layer that can be added in to a Layer tree. |
| 76 virtual ui::Layer* GetRootLayer() = 0; | 76 virtual ui::Layer* GetRootLayer() = 0; |
| 77 | 77 |
| 78 // Returns true when the ripple is visible. This is different from checking if | 78 // Returns true when the ripple is visible. This is different from checking if |
| 79 // the ink_drop_state() == HIDDEN because the ripple may be visible while it | 79 // the ink_drop_state() == HIDDEN because the ripple may be visible while it |
| 80 // animates to the target HIDDEN state. | 80 // animates to the target HIDDEN state. |
| 81 bool IsVisible(); | 81 bool IsVisible(); |
| 82 | 82 |
| 83 // Returns true if this ripple is mutually exclusive with InkDropHighlight. | |
| 84 virtual bool OverridesHighlight() const = 0; | |
| 85 | |
| 86 // Returns a test api to access internals of this. Default implmentations | 83 // Returns a test api to access internals of this. Default implmentations |
| 87 // should return nullptr and test specific subclasses can override to return | 84 // should return nullptr and test specific subclasses can override to return |
| 88 // an instance. | 85 // an instance. |
| 89 virtual test::InkDropRippleTestApi* GetTestApi(); | 86 virtual test::InkDropRippleTestApi* GetTestApi(); |
| 90 | 87 |
| 91 protected: | 88 protected: |
| 92 // Animates the ripple from the |old_ink_drop_state| to the | 89 // Animates the ripple from the |old_ink_drop_state| to the |
| 93 // |new_ink_drop_state|. |observer| is added to all LayerAnimationSequence's | 90 // |new_ink_drop_state|. |observer| is added to all LayerAnimationSequence's |
| 94 // used if not null. | 91 // used if not null. |
| 95 virtual void AnimateStateChange(InkDropState old_ink_drop_state, | 92 virtual void AnimateStateChange(InkDropState old_ink_drop_state, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 120 InkDropState target_ink_drop_state_; | 117 InkDropState target_ink_drop_state_; |
| 121 | 118 |
| 122 InkDropRippleObserver* observer_; | 119 InkDropRippleObserver* observer_; |
| 123 | 120 |
| 124 DISALLOW_COPY_AND_ASSIGN(InkDropRipple); | 121 DISALLOW_COPY_AND_ASSIGN(InkDropRipple); |
| 125 }; | 122 }; |
| 126 | 123 |
| 127 } // namespace views | 124 } // namespace views |
| 128 | 125 |
| 129 #endif // UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ | 126 #endif // UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ |
| OLD | NEW |