| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 virtual void DidLoseOutputSurface() OVERRIDE; | 36 virtual void DidLoseOutputSurface() OVERRIDE; |
| 37 | 37 |
| 38 int scroll_layer_id() const { return scroll_layer_id_; } | 38 int scroll_layer_id() const { return scroll_layer_id_; } |
| 39 void set_scroll_layer_id(int id) { scroll_layer_id_ = id; } | 39 void set_scroll_layer_id(int id) { scroll_layer_id_ = id; } |
| 40 | 40 |
| 41 ScrollbarOrientation Orientation() const; | 41 ScrollbarOrientation Orientation() const; |
| 42 float CurrentPos() const; | 42 float CurrentPos() const; |
| 43 int Maximum() const; | 43 int Maximum() const; |
| 44 | 44 |
| 45 void set_thumb_thickness(int thumb_thickness) { | 45 void SetThumbThickness(int thumb_thickness); |
| 46 thumb_thickness_ = thumb_thickness; | |
| 47 } | |
| 48 int thumb_thickness() const { return thumb_thickness_; } | 46 int thumb_thickness() const { return thumb_thickness_; } |
| 49 void set_thumb_length(int thumb_length) { | 47 void SetThumbLength(int thumb_length); |
| 50 thumb_length_ = thumb_length; | 48 void SetTrackStart(int track_start); |
| 51 } | 49 void SetTrackLength(int track_length); |
| 52 void set_track_start(int track_start) { | 50 void SetVerticalAdjust(float vertical_adjust); |
| 53 track_start_ = track_start; | |
| 54 } | |
| 55 void set_track_length(int track_length) { | |
| 56 track_length_ = track_length; | |
| 57 } | |
| 58 void set_vertical_adjust(float vertical_adjust) { | |
| 59 vertical_adjust_ = vertical_adjust; | |
| 60 } | |
| 61 void set_track_resource_id(ResourceProvider::ResourceId id) { | 51 void set_track_resource_id(ResourceProvider::ResourceId id) { |
| 62 track_resource_id_ = id; | 52 track_resource_id_ = id; |
| 63 } | 53 } |
| 64 void set_thumb_resource_id(ResourceProvider::ResourceId id) { | 54 void set_thumb_resource_id(ResourceProvider::ResourceId id) { |
| 65 thumb_resource_id_ = id; | 55 thumb_resource_id_ = id; |
| 66 } | 56 } |
| 67 void set_visible_to_total_length_ratio(float ratio) { | 57 void SetVisibleToTotalLengthRatio(float ratio); |
| 68 visible_to_total_length_ratio_ = ratio; | |
| 69 } | |
| 70 void set_is_overlay_scrollbar(bool is_overlay_scrollbar) { | 58 void set_is_overlay_scrollbar(bool is_overlay_scrollbar) { |
| 71 is_overlay_scrollbar_ = is_overlay_scrollbar; | 59 is_overlay_scrollbar_ = is_overlay_scrollbar; |
| 72 } | 60 } |
| 73 bool is_overlay_scrollbar() const { return is_overlay_scrollbar_; } | 61 bool is_overlay_scrollbar() const { return is_overlay_scrollbar_; } |
| 74 | 62 |
| 75 void SetCurrentPos(float current_pos); | 63 void SetCurrentPos(float current_pos); |
| 76 void SetMaximum(int maximum); | 64 void SetMaximum(int maximum); |
| 77 | 65 |
| 78 gfx::Rect ComputeThumbQuadRect() const; | 66 gfx::Rect ComputeThumbQuadRect() const; |
| 79 | 67 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 106 | 94 |
| 107 int scroll_layer_id_; | 95 int scroll_layer_id_; |
| 108 | 96 |
| 109 bool is_overlay_scrollbar_; | 97 bool is_overlay_scrollbar_; |
| 110 | 98 |
| 111 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); | 99 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); |
| 112 }; | 100 }; |
| 113 | 101 |
| 114 } // namespace cc | 102 } // namespace cc |
| 115 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ | 103 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ |
| OLD | NEW |