| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 47 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 50 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 51 int id, | 51 int id, |
| 52 ScrollbarOrientation orientation, | 52 ScrollbarOrientation orientation, |
| 53 bool is_left_side_vertical_scrollbar); | 53 bool is_left_side_vertical_scrollbar); |
| 54 virtual ~ScrollbarLayerImplBase() {} | 54 virtual ~ScrollbarLayerImplBase() {} |
| 55 | 55 |
| 56 gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const; | 56 gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 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; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 83 float vertical_adjust_; | 83 float vertical_adjust_; |
| 84 | 84 |
| 85 float visible_to_total_length_ratio_; | 85 float visible_to_total_length_ratio_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 87 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace cc | 90 } // namespace cc |
| 91 | 91 |
| 92 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 92 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |