| 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_SQUARE_INK_DROP_ANIMATION_H_ | 5 #ifndef UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
| 6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ | 6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // {All InkDropStates} => HIDDEN | 41 // {All InkDropStates} => HIDDEN |
| 42 // HIDDEN => ACTION_PENDING | 42 // HIDDEN => ACTION_PENDING |
| 43 // HIDDEN, ACTION_PENDING => QUICK_ACTION | 43 // HIDDEN, ACTION_PENDING => QUICK_ACTION |
| 44 // ACTION_PENDING => SLOW_ACTION_PENDING | 44 // ACTION_PENDING => SLOW_ACTION_PENDING |
| 45 // SLOW_ACTION_PENDING => SLOW_ACTION | 45 // SLOW_ACTION_PENDING => SLOW_ACTION |
| 46 // {All InkDropStates} => ACTIVATED | 46 // {All InkDropStates} => ACTIVATED |
| 47 // {All InkDropStates} => DEACTIVATED | 47 // {All InkDropStates} => DEACTIVATED |
| 48 // | 48 // |
| 49 class VIEWS_EXPORT SquareInkDropAnimation : public InkDropAnimation { | 49 class VIEWS_EXPORT SquareInkDropAnimation : public InkDropAnimation { |
| 50 public: | 50 public: |
| 51 SquareInkDropAnimation(const gfx::Size& large_size, | 51 SquareInkDropAnimation(SkColor color, |
| 52 const gfx::Size& large_size, |
| 52 int large_corner_radius, | 53 int large_corner_radius, |
| 53 const gfx::Size& small_size, | 54 const gfx::Size& small_size, |
| 54 int small_corner_radius); | 55 int small_corner_radius); |
| 55 ~SquareInkDropAnimation() override; | 56 ~SquareInkDropAnimation() override; |
| 56 | 57 |
| 58 // Returns the color used to draw this animation. |
| 59 SkColor GetColor() const; |
| 60 |
| 57 // InkDropAnimation: | 61 // InkDropAnimation: |
| 58 void AbortAllAnimations() override; | 62 void AbortAllAnimations() override; |
| 59 | 63 |
| 60 protected: | 64 protected: |
| 61 // InkDropAnimation: | 65 // InkDropAnimation: |
| 62 void AnimateStateChange(InkDropState old_ink_drop_state, | 66 void AnimateStateChange(InkDropState old_ink_drop_state, |
| 63 InkDropState new_ink_drop_state, | 67 InkDropState new_ink_drop_state, |
| 64 ui::LayerAnimationObserver* observer) override; | 68 ui::LayerAnimationObserver* observer) override; |
| 65 void SetStateToHidden() override; | 69 void SetStateToHidden() override; |
| 66 | 70 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 151 |
| 148 // ui::Layers for all of the painted shape layers that compose the ink drop. | 152 // ui::Layers for all of the painted shape layers that compose the ink drop. |
| 149 scoped_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT]; | 153 scoped_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT]; |
| 150 | 154 |
| 151 DISALLOW_COPY_AND_ASSIGN(SquareInkDropAnimation); | 155 DISALLOW_COPY_AND_ASSIGN(SquareInkDropAnimation); |
| 152 }; | 156 }; |
| 153 | 157 |
| 154 } // namespace views | 158 } // namespace views |
| 155 | 159 |
| 156 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ | 160 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
| OLD | NEW |