| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BLIMP_LAYER_FACTORY_H_ | 5 #ifndef CC_BLIMP_LAYER_FACTORY_H_ |
| 6 #define CC_BLIMP_LAYER_FACTORY_H_ | 6 #define CC_BLIMP_LAYER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "cc/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 class ContentLayerClient; | 13 class ContentLayerClient; |
| 14 class Layer; | 14 class Layer; |
| 15 class PictureLayer; | 15 class PictureLayer; |
| 16 class SolidColorScrollbarLayer; | 16 class SolidColorScrollbarLayer; |
| 17 | 17 |
| 18 // Used to allow tests to inject the Layer created by the | 18 // Used to allow tests to inject the Layer created by the |
| 19 // CompositorStateDeserializer on the client. | 19 // CompositorStateDeserializer on the client. |
| 20 class LayerFactory { | 20 class LayerFactory { |
| 21 public: | 21 public: |
| 22 virtual ~LayerFactory() {} | 22 virtual ~LayerFactory() {} |
| 23 | 23 |
| 24 virtual scoped_refptr<Layer> CreateLayer(int engine_layer_id) = 0; | 24 virtual scoped_refptr<Layer> CreateLayer(int engine_layer_id) = 0; |
| 25 | 25 |
| 26 virtual scoped_refptr<PictureLayer> CreatePictureLayer( | 26 virtual scoped_refptr<PictureLayer> CreatePictureLayer( |
| 27 int engine_layer_id, | 27 int engine_layer_id, |
| 28 ContentLayerClient* content_layer_client) = 0; | 28 ContentLayerClient* content_layer_client) = 0; |
| 29 | 29 |
| 30 virtual scoped_refptr<PictureLayer> CreateFakePictureLayer( | |
| 31 int engine_layer_id, | |
| 32 ContentLayerClient* content_layer_client) = 0; | |
| 33 | |
| 34 virtual scoped_refptr<SolidColorScrollbarLayer> | 30 virtual scoped_refptr<SolidColorScrollbarLayer> |
| 35 CreateSolidColorScrollbarLayer(int engine_layer_id, | 31 CreateSolidColorScrollbarLayer(int engine_layer_id, |
| 36 ScrollbarOrientation orientation, | 32 ScrollbarOrientation orientation, |
| 37 int thumb_thickness, | 33 int thumb_thickness, |
| 38 int track_start, | 34 int track_start, |
| 39 bool is_left_side_vertical_scrollbar, | 35 bool is_left_side_vertical_scrollbar, |
| 40 int scroll_layer_id) = 0; | 36 int scroll_layer_id) = 0; |
| 37 |
| 38 // Create layers for testing. |
| 39 virtual scoped_refptr<PictureLayer> CreateFakePictureLayer( |
| 40 int engine_layer_id, |
| 41 ContentLayerClient* content_layer_client) = 0; |
| 42 |
| 43 virtual scoped_refptr<Layer> CreatePushPropertiesCountingLayer( |
| 44 int engine_layer_id) = 0; |
| 41 }; | 45 }; |
| 42 | 46 |
| 43 } // namespace cc | 47 } // namespace cc |
| 44 | 48 |
| 45 #endif // CC_BLIMP_LAYER_FACTORY_H_ | 49 #endif // CC_BLIMP_LAYER_FACTORY_H_ |
| OLD | NEW |