| 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_H_ | 5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 6 #define CC_LAYERS_PAINTED_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/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
| 11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
| 12 #include "cc/layers/scrollbar_layer_interface.h" | 12 #include "cc/layers/scrollbar_layer_interface.h" |
| 13 #include "cc/layers/scrollbar_theme_painter.h" | 13 #include "cc/layers/scrollbar_theme_painter.h" |
| 14 #include "cc/resources/scoped_ui_resource.h" | 14 #include "cc/resources/scoped_ui_resource.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface, | 18 class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface, |
| 19 public Layer { | 19 public Layer { |
| 20 public: | 20 public: |
| 21 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 21 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 22 | 22 |
| 23 static scoped_refptr<PaintedScrollbarLayer> Create( | 23 static scoped_refptr<PaintedScrollbarLayer> Create( |
| 24 std::unique_ptr<Scrollbar> scrollbar, | 24 std::unique_ptr<Scrollbar> scrollbar, |
| 25 ElementId element_id = ElementId()); | 25 ElementId element_id = ElementId()); |
| 26 | 26 |
| 27 bool OpacityCanAnimateOnImplThread() const override; | 27 bool OpacityCanAnimateOnImplThread() const override; |
| 28 bool AlwaysUseActiveTreeOpacity() const override; | |
| 29 ScrollbarLayerInterface* ToScrollbarLayer() override; | 28 ScrollbarLayerInterface* ToScrollbarLayer() override; |
| 30 | 29 |
| 31 // ScrollbarLayerInterface | 30 // ScrollbarLayerInterface |
| 32 ElementId scroll_element_id() const override; | 31 ElementId scroll_element_id() const override; |
| 33 void SetScrollElementId(ElementId element_id) override; | 32 void SetScrollElementId(ElementId element_id) override; |
| 34 | 33 |
| 35 ScrollbarOrientation orientation() const override; | 34 ScrollbarOrientation orientation() const override; |
| 36 | 35 |
| 37 // Layer interface | 36 // Layer interface |
| 38 bool Update() override; | 37 bool Update() override; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 std::unique_ptr<ScopedUIResource> thumb_resource_; | 93 std::unique_ptr<ScopedUIResource> thumb_resource_; |
| 95 | 94 |
| 96 float thumb_opacity_; | 95 float thumb_opacity_; |
| 97 | 96 |
| 98 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); | 97 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); |
| 99 }; | 98 }; |
| 100 | 99 |
| 101 } // namespace cc | 100 } // namespace cc |
| 102 | 101 |
| 103 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 102 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| OLD | NEW |