| 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/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| 11 #include "cc/layers/scrollbar_layer_interface.h" | 11 #include "cc/layers/scrollbar_layer_interface.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 | 14 |
| 15 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface, | 15 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface, |
| 16 public Layer { | 16 public Layer { |
| 17 public: | 17 public: |
| 18 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 18 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 19 | 19 |
| 20 static scoped_refptr<SolidColorScrollbarLayer> Create( | 20 static scoped_refptr<SolidColorScrollbarLayer> Create( |
| 21 ScrollbarOrientation orientation, | 21 ScrollbarOrientation orientation, |
| 22 int thumb_thickness, | 22 int thumb_thickness, |
| 23 int track_start, | 23 int track_start, |
| 24 bool is_left_side_vertical_scrollbar, | 24 bool is_left_side_vertical_scrollbar, |
| 25 ElementId scroll_element_id); | 25 ElementId scroll_element_id); |
| 26 | 26 |
| 27 // Layer overrides. | 27 // Layer overrides. |
| 28 bool OpacityCanAnimateOnImplThread() const override; | 28 bool OpacityCanAnimateOnImplThread() const override; |
| 29 bool AlwaysUseActiveTreeOpacity() const override; | |
| 30 ScrollbarLayerInterface* ToScrollbarLayer() override; | 29 ScrollbarLayerInterface* ToScrollbarLayer() override; |
| 31 | 30 |
| 32 void SetOpacity(float opacity) override; | 31 void SetOpacity(float opacity) override; |
| 33 void PushPropertiesTo(LayerImpl* layer) override; | 32 void PushPropertiesTo(LayerImpl* layer) override; |
| 34 | 33 |
| 35 void SetNeedsDisplayRect(const gfx::Rect& rect) override; | 34 void SetNeedsDisplayRect(const gfx::Rect& rect) override; |
| 36 | 35 |
| 37 // ScrollbarLayerInterface | 36 // ScrollbarLayerInterface |
| 38 ElementId scroll_element_id() const override; | 37 ElementId scroll_element_id() const override; |
| 39 void SetScrollElementId(ElementId element_id) override; | 38 void SetScrollElementId(ElementId element_id) override; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; | 81 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); | 83 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace cc | 86 } // namespace cc |
| 88 | 87 |
| 89 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 88 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
| OLD | NEW |