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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 void set_visible_to_total_length_ratio(float ratio) { | 64 void set_visible_to_total_length_ratio(float ratio) { |
65 visible_to_total_length_ratio_ = ratio; | 65 visible_to_total_length_ratio_ = ratio; |
66 } | 66 } |
67 | 67 |
68 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } | 68 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } |
69 void SetMaximum(int maximum) { maximum_ = maximum; } | 69 void SetMaximum(int maximum) { maximum_ = maximum; } |
70 | 70 |
71 gfx::Rect ComputeThumbQuadRect() const; | 71 gfx::Rect ComputeThumbQuadRect() const; |
72 | 72 |
| 73 virtual bool CanDrawInTilelessSoftwareMode() const OVERRIDE; |
| 74 |
73 protected: | 75 protected: |
74 ScrollbarLayerImpl(LayerTreeImpl* tree_impl, | 76 ScrollbarLayerImpl(LayerTreeImpl* tree_impl, |
75 int id, | 77 int id, |
76 ScrollbarOrientation orientation); | 78 ScrollbarOrientation orientation); |
77 | 79 |
78 private: | 80 private: |
79 virtual const char* LayerTypeAsString() const OVERRIDE; | 81 virtual const char* LayerTypeAsString() const OVERRIDE; |
80 | 82 |
81 gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const; | 83 gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const; |
82 | 84 |
(...skipping 20 matching lines...) Expand all Loading... |
103 bool is_scroll_view_scrollbar_; | 105 bool is_scroll_view_scrollbar_; |
104 bool enabled_; | 106 bool enabled_; |
105 bool is_custom_scrollbar_; | 107 bool is_custom_scrollbar_; |
106 bool is_overlay_scrollbar_; | 108 bool is_overlay_scrollbar_; |
107 | 109 |
108 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); | 110 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace cc | 113 } // namespace cc |
112 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ | 114 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ |
OLD | NEW |