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_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 | 57 |
58 float visible_to_total_length_ratio() const { | 58 float visible_to_total_length_ratio() const { |
59 return visible_to_total_length_ratio_; | 59 return visible_to_total_length_ratio_; |
60 } | 60 } |
61 float vertical_adjust() const { return vertical_adjust_; } | 61 float vertical_adjust() const { return vertical_adjust_; } |
62 | 62 |
63 virtual int ThumbThickness() const = 0; | 63 virtual int ThumbThickness() const = 0; |
64 virtual int ThumbLength() const = 0; | 64 virtual int ThumbLength() const = 0; |
65 virtual float TrackLength() const = 0; | 65 virtual float TrackLength() const = 0; |
66 virtual int TrackStart() const = 0; | 66 virtual int TrackStart() const = 0; |
67 // Indicates whether the thumb represents the visible to total length ratio. | |
aelias_OOO_until_Jul13
2014/01/08 22:30:17
I'd make this say "whether the thumb length can be
| |
68 virtual bool IsThumbResizable() const = 0; | |
67 | 69 |
68 private: | 70 private: |
69 int scroll_layer_id_; | 71 int scroll_layer_id_; |
70 bool is_overlay_scrollbar_; | 72 bool is_overlay_scrollbar_; |
71 | 73 |
72 float thumb_thickness_scale_factor_; | 74 float thumb_thickness_scale_factor_; |
73 float current_pos_; | 75 float current_pos_; |
74 int maximum_; | 76 int maximum_; |
75 ScrollbarOrientation orientation_; | 77 ScrollbarOrientation orientation_; |
76 bool is_left_side_vertical_scrollbar_; | 78 bool is_left_side_vertical_scrollbar_; |
77 | 79 |
78 // Difference between the clip layer's height and the visible viewport | 80 // Difference between the clip layer's height and the visible viewport |
79 // height (which may differ in the presence of top-controls hiding). | 81 // height (which may differ in the presence of top-controls hiding). |
80 float vertical_adjust_; | 82 float vertical_adjust_; |
81 | 83 |
82 float visible_to_total_length_ratio_; | 84 float visible_to_total_length_ratio_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 86 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
85 }; | 87 }; |
86 | 88 |
87 } // namespace cc | 89 } // namespace cc |
88 | 90 |
89 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 91 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
OLD | NEW |