Chromium Code Reviews| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 void SetVisibleToTotalLengthRatio(float ratio); | 51 void SetVisibleToTotalLengthRatio(float ratio); |
| 52 virtual gfx::Rect ComputeThumbQuadRect() const; | 52 virtual gfx::Rect ComputeThumbQuadRect() const; |
| 53 | 53 |
| 54 float thumb_thickness_scale_factor() { | 54 float thumb_thickness_scale_factor() { |
| 55 return thumb_thickness_scale_factor_; | 55 return thumb_thickness_scale_factor_; |
| 56 } | 56 } |
| 57 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 57 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 58 | 58 |
| 59 void ScrollbarParametersDidChange(); | 59 void ScrollbarParametersDidChange(); |
| 60 | 60 |
| 61 bool ScrollbarNeedsUpdate(float vertical_adjust, | |
|
weiliangc
2014/09/15 17:14:37
The four setter function already checks whether th
| |
| 62 float current_pos, | |
| 63 int maximum, | |
| 64 float visible_to_total_length_ratio); | |
| 65 | |
| 61 protected: | 66 protected: |
| 62 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 67 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 63 int id, | 68 int id, |
| 64 ScrollbarOrientation orientation, | 69 ScrollbarOrientation orientation, |
| 65 bool is_left_side_vertical_scrollbar, | 70 bool is_left_side_vertical_scrollbar, |
| 66 bool is_overlay); | 71 bool is_overlay); |
| 67 virtual ~ScrollbarLayerImplBase(); | 72 virtual ~ScrollbarLayerImplBase(); |
| 68 | 73 |
| 69 gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const; | 74 gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 70 | 75 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 97 float vertical_adjust_; | 102 float vertical_adjust_; |
| 98 | 103 |
| 99 float visible_to_total_length_ratio_; | 104 float visible_to_total_length_ratio_; |
| 100 | 105 |
| 101 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 106 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 102 }; | 107 }; |
| 103 | 108 |
| 104 } // namespace cc | 109 } // namespace cc |
| 105 | 110 |
| 106 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 111 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |