OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ | 5 #ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ |
6 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ | 6 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/animation/scrollbar_animation_controller.h" | 9 #include "cc/animation/scrollbar_animation_controller.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 DECREASE | 55 DECREASE |
56 }; | 56 }; |
57 float OpacityAtAnimationProgress(float progress); | 57 float OpacityAtAnimationProgress(float progress); |
58 float ThumbThicknessScaleAtAnimationProgress(float progress); | 58 float ThumbThicknessScaleAtAnimationProgress(float progress); |
59 float AdjustScale(float new_value, | 59 float AdjustScale(float new_value, |
60 float current_value, | 60 float current_value, |
61 AnimationChange animation_change); | 61 AnimationChange animation_change); |
62 void ApplyOpacityAndThumbThicknessScale(float opacity, | 62 void ApplyOpacityAndThumbThicknessScale(float opacity, |
63 float thumb_thickness_scale); | 63 float thumb_thickness_scale); |
64 | 64 |
65 LayerImpl* scroll_layer_; | |
66 | |
67 bool mouse_is_over_scrollbar_; | 65 bool mouse_is_over_scrollbar_; |
68 bool mouse_is_near_scrollbar_; | 66 bool mouse_is_near_scrollbar_; |
69 // Are we narrowing or thickening the bars. | 67 // Are we narrowing or thickening the bars. |
70 AnimationChange thickness_change_; | 68 AnimationChange thickness_change_; |
71 // Are we darkening or lightening the bars. | 69 // Are we darkening or lightening the bars. |
72 AnimationChange opacity_change_; | 70 AnimationChange opacity_change_; |
73 // How close should the mouse be to the scrollbar before we thicken it. | 71 // How close should the mouse be to the scrollbar before we thicken it. |
74 float mouse_move_distance_to_trigger_animation_; | 72 float mouse_move_distance_to_trigger_animation_; |
75 | 73 |
76 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning); | 74 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning); |
77 }; | 75 }; |
78 | 76 |
79 } // namespace cc | 77 } // namespace cc |
80 | 78 |
81 #endif // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ | 79 #endif // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ |
OLD | NEW |