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/layers/scrollbar_geometry_fixed_thumb.h" | 9 #include "cc/layers/scrollbar_geometry_fixed_thumb.h" |
10 #include "cc/layers/scrollbar_layer_impl_base.h" | 10 #include "cc/layers/scrollbar_layer_impl_base.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 void set_back_track_resource_id(ResourceProvider::ResourceId id) { | 39 void set_back_track_resource_id(ResourceProvider::ResourceId id) { |
40 back_track_resource_id_ = id; | 40 back_track_resource_id_ = id; |
41 } | 41 } |
42 void set_fore_track_resource_id(ResourceProvider::ResourceId id) { | 42 void set_fore_track_resource_id(ResourceProvider::ResourceId id) { |
43 fore_track_resource_id_ = id; | 43 fore_track_resource_id_ = id; |
44 } | 44 } |
45 void set_thumb_resource_id(ResourceProvider::ResourceId id) { | 45 void set_thumb_resource_id(ResourceProvider::ResourceId id) { |
46 thumb_resource_id_ = id; | 46 thumb_resource_id_ = id; |
47 } | 47 } |
48 bool HasThumbTexture() { return thumb_resource_id_ != 0; } | 48 bool HasThumbTexture() { return thumb_resource_id_; } |
49 | 49 |
50 | 50 |
51 // ScrollbarLayerImplBase implementation. | 51 // ScrollbarLayerImplBase implementation. |
52 virtual float CurrentPos() const OVERRIDE; | 52 virtual float CurrentPos() const OVERRIDE; |
53 virtual int TotalSize() const OVERRIDE; | 53 virtual int TotalSize() const OVERRIDE; |
54 virtual int Maximum() const OVERRIDE; | 54 virtual int Maximum() const OVERRIDE; |
55 | 55 |
56 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } | 56 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } |
57 void SetTotalSize(int total_size) { total_size_ = total_size; } | 57 void SetTotalSize(int total_size) { total_size_ = total_size; } |
58 void SetMaximum(int maximum) { maximum_ = maximum; } | 58 void SetMaximum(int maximum) { maximum_ = maximum; } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool is_scroll_view_scrollbar_; | 144 bool is_scroll_view_scrollbar_; |
145 bool enabled_; | 145 bool enabled_; |
146 bool is_custom_scrollbar_; | 146 bool is_custom_scrollbar_; |
147 bool is_overlay_scrollbar_; | 147 bool is_overlay_scrollbar_; |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); | 149 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); |
150 }; | 150 }; |
151 | 151 |
152 } // namespace cc | 152 } // namespace cc |
153 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ | 153 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ |
OLD | NEW |