OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_H_ | 5 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ |
6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ | 6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 thumb_resource_id_ = id; | 65 thumb_resource_id_ = id; |
66 } | 66 } |
67 void set_visible_to_total_length_ratio(float ratio) { | 67 void set_visible_to_total_length_ratio(float ratio) { |
68 visible_to_total_length_ratio_ = ratio; | 68 visible_to_total_length_ratio_ = ratio; |
69 } | 69 } |
70 void set_is_overlay_scrollbar(bool is_overlay_scrollbar) { | 70 void set_is_overlay_scrollbar(bool is_overlay_scrollbar) { |
71 is_overlay_scrollbar_ = is_overlay_scrollbar; | 71 is_overlay_scrollbar_ = is_overlay_scrollbar; |
72 } | 72 } |
73 bool is_overlay_scrollbar() const { return is_overlay_scrollbar_; } | 73 bool is_overlay_scrollbar() const { return is_overlay_scrollbar_; } |
74 | 74 |
75 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } | 75 void SetCurrentPos(float current_pos); |
76 void SetMaximum(int maximum) { maximum_ = maximum; } | 76 void SetMaximum(int maximum); |
77 | 77 |
78 gfx::Rect ComputeThumbQuadRect() const; | 78 gfx::Rect ComputeThumbQuadRect() const; |
79 | 79 |
80 protected: | 80 protected: |
81 ScrollbarLayerImpl(LayerTreeImpl* tree_impl, | 81 ScrollbarLayerImpl(LayerTreeImpl* tree_impl, |
82 int id, | 82 int id, |
83 ScrollbarOrientation orientation); | 83 ScrollbarOrientation orientation); |
84 | 84 |
85 private: | 85 private: |
86 virtual const char* LayerTypeAsString() const OVERRIDE; | 86 virtual const char* LayerTypeAsString() const OVERRIDE; |
(...skipping 19 matching lines...) Expand all Loading... |
106 | 106 |
107 int scroll_layer_id_; | 107 int scroll_layer_id_; |
108 | 108 |
109 bool is_overlay_scrollbar_; | 109 bool is_overlay_scrollbar_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); | 111 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace cc | 114 } // namespace cc |
115 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ | 115 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ |
OLD | NEW |