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_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_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/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Layer overrides for proto conversions. | 51 // Layer overrides for proto conversions. |
52 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 52 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
53 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; | 53 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; |
54 void FromLayerSpecificPropertiesProto( | 54 void FromLayerSpecificPropertiesProto( |
55 const proto::LayerProperties& proto) override; | 55 const proto::LayerProperties& proto) override; |
56 | 56 |
57 private: | 57 private: |
58 friend class LayerSerializationTest; | 58 friend class LayerSerializationTest; |
59 | 59 |
60 int scroll_layer_id_; | 60 // Encapsulate all data, callbacks, interfaces received from the embedder. |
61 ScrollbarOrientation orientation_; | 61 struct SolidColorScrollbarLayerInputs { |
62 int thumb_thickness_; | 62 SolidColorScrollbarLayerInputs(ScrollbarOrientation orientation, |
63 int track_start_; | 63 int thumb_thickness, |
64 bool is_left_side_vertical_scrollbar_; | 64 int track_start, |
| 65 bool is_left_side_vertical_scrollbar, |
| 66 int scroll_layer_id); |
| 67 ~SolidColorScrollbarLayerInputs(); |
| 68 |
| 69 int scroll_layer_id; |
| 70 ScrollbarOrientation orientation; |
| 71 int thumb_thickness; |
| 72 int track_start; |
| 73 bool is_left_side_vertical_scrollbar; |
| 74 }; |
| 75 |
| 76 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; |
65 | 77 |
66 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); | 78 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); |
67 }; | 79 }; |
68 | 80 |
69 } // namespace cc | 81 } // namespace cc |
70 | 82 |
71 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 83 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
OLD | NEW |