| 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" |
| 11 #include "cc/layers/scrollbar_layer_impl_base.h" | 11 #include "cc/layers/scrollbar_layer_impl_base.h" |
| 12 #include "cc/resources/ui_resource_client.h" | 12 #include "cc/resources/ui_resource_client.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class LayerTreeImpl; | 16 class LayerTreeImpl; |
| 17 class ScrollView; | 17 class ScrollView; |
| 18 | 18 |
| 19 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase { | 19 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase { |
| 20 public: | 20 public: |
| 21 static scoped_ptr<PaintedScrollbarLayerImpl> Create( | 21 static std::unique_ptr<PaintedScrollbarLayerImpl> |
| 22 LayerTreeImpl* tree_impl, | 22 Create(LayerTreeImpl* tree_impl, int id, ScrollbarOrientation orientation); |
| 23 int id, | |
| 24 ScrollbarOrientation orientation); | |
| 25 ~PaintedScrollbarLayerImpl() override; | 23 ~PaintedScrollbarLayerImpl() override; |
| 26 | 24 |
| 27 // LayerImpl implementation. | 25 // LayerImpl implementation. |
| 28 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 26 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 29 void PushPropertiesTo(LayerImpl* layer) override; | 27 void PushPropertiesTo(LayerImpl* layer) override; |
| 30 | 28 |
| 31 bool WillDraw(DrawMode draw_mode, | 29 bool WillDraw(DrawMode draw_mode, |
| 32 ResourceProvider* resource_provider) override; | 30 ResourceProvider* resource_provider) override; |
| 33 void AppendQuads(RenderPass* render_pass, | 31 void AppendQuads(RenderPass* render_pass, |
| 34 AppendQuadsData* append_quads_data) override; | 32 AppendQuadsData* append_quads_data) override; |
| 35 gfx::Rect GetEnclosingRectInTargetSpace() const override; | 33 gfx::Rect GetEnclosingRectInTargetSpace() const override; |
| 36 | 34 |
| 37 void SetThumbThickness(int thumb_thickness); | 35 void SetThumbThickness(int thumb_thickness); |
| 38 void SetThumbLength(int thumb_length); | 36 void SetThumbLength(int thumb_length); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 int thumb_thickness_; | 78 int thumb_thickness_; |
| 81 int thumb_length_; | 79 int thumb_length_; |
| 82 int track_start_; | 80 int track_start_; |
| 83 int track_length_; | 81 int track_length_; |
| 84 | 82 |
| 85 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); | 83 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace cc | 86 } // namespace cc |
| 89 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ | 87 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ |
| OLD | NEW |