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_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 5 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
9 #include "cc/input/scrollbar.h" | 9 #include "cc/input/scrollbar.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 return is_left_side_vertical_scrollbar_; | 44 return is_left_side_vertical_scrollbar_; |
45 } | 45 } |
46 | 46 |
47 bool CanScrollOrientation() const; | 47 bool CanScrollOrientation() const; |
48 | 48 |
49 void PushPropertiesTo(LayerImpl* layer) override; | 49 void PushPropertiesTo(LayerImpl* layer) override; |
50 ScrollbarLayerImplBase* ToScrollbarLayer() override; | 50 ScrollbarLayerImplBase* ToScrollbarLayer() override; |
51 void PushScrollClipPropertiesTo(LayerImpl* layer); | 51 void PushScrollClipPropertiesTo(LayerImpl* layer); |
52 | 52 |
53 bool SetVisibleToTotalLengthRatio(float ratio); | 53 bool SetVisibleToTotalLengthRatio(float ratio); |
| 54 // Thumb quad rect in layer space. |
54 virtual gfx::Rect ComputeThumbQuadRect() const; | 55 virtual gfx::Rect ComputeThumbQuadRect() const; |
55 | 56 |
56 float thumb_thickness_scale_factor() { | 57 float thumb_thickness_scale_factor() { |
57 return thumb_thickness_scale_factor_; | 58 return thumb_thickness_scale_factor_; |
58 } | 59 } |
59 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 60 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
60 | 61 |
61 void ScrollbarParametersDidChange(bool on_resize); | 62 void ScrollbarParametersDidChange(bool on_resize); |
62 | 63 |
63 protected: | 64 protected: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 float vertical_adjust_; | 100 float vertical_adjust_; |
100 | 101 |
101 float visible_to_total_length_ratio_; | 102 float visible_to_total_length_ratio_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 104 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
104 }; | 105 }; |
105 | 106 |
106 } // namespace cc | 107 } // namespace cc |
107 | 108 |
108 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 109 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
OLD | NEW |