| 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_PAINTED_SCROLLBAR_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 void set_thumb_opacity(float opacity) { thumb_opacity_ = opacity; } | 50 void set_thumb_opacity(float opacity) { thumb_opacity_ = opacity; } |
| 51 | 51 |
| 52 void set_internal_contents_scale_and_bounds(float content_scale, | 52 void set_internal_contents_scale_and_bounds(float content_scale, |
| 53 const gfx::Size& content_bounds) { | 53 const gfx::Size& content_bounds) { |
| 54 internal_contents_scale_ = content_scale; | 54 internal_contents_scale_ = content_scale; |
| 55 internal_content_bounds_ = content_bounds; | 55 internal_content_bounds_ = content_bounds; |
| 56 } | 56 } |
| 57 | 57 |
| 58 int ThumbThickness() const override; |
| 59 |
| 58 protected: | 60 protected: |
| 59 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl, | 61 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl, |
| 60 int id, | 62 int id, |
| 61 ScrollbarOrientation orientation, | 63 ScrollbarOrientation orientation, |
| 62 bool is_left_side_vertical_scrollbar, | 64 bool is_left_side_vertical_scrollbar, |
| 63 bool is_overlay); | 65 bool is_overlay); |
| 64 | 66 |
| 65 // ScrollbarLayerImplBase implementation. | 67 // ScrollbarLayerImplBase implementation. |
| 66 int ThumbThickness() const override; | |
| 67 int ThumbLength() const override; | 68 int ThumbLength() const override; |
| 68 float TrackLength() const override; | 69 float TrackLength() const override; |
| 69 int TrackStart() const override; | 70 int TrackStart() const override; |
| 70 bool IsThumbResizable() const override; | 71 bool IsThumbResizable() const override; |
| 71 | 72 |
| 72 private: | 73 private: |
| 73 const char* LayerTypeAsString() const override; | 74 const char* LayerTypeAsString() const override; |
| 74 | 75 |
| 75 UIResourceId track_ui_resource_id_; | 76 UIResourceId track_ui_resource_id_; |
| 76 UIResourceId thumb_ui_resource_id_; | 77 UIResourceId thumb_ui_resource_id_; |
| 77 | 78 |
| 78 float thumb_opacity_; | 79 float thumb_opacity_; |
| 79 | 80 |
| 80 float internal_contents_scale_; | 81 float internal_contents_scale_; |
| 81 gfx::Size internal_content_bounds_; | 82 gfx::Size internal_content_bounds_; |
| 82 | 83 |
| 83 int thumb_thickness_; | 84 int thumb_thickness_; |
| 84 int thumb_length_; | 85 int thumb_length_; |
| 85 int track_start_; | 86 int track_start_; |
| 86 int track_length_; | 87 int track_length_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); | 89 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace cc | 92 } // namespace cc |
| 92 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ | 93 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ |
| OLD | NEW |