| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "cc/test/remote_client_layer_factory.h" | |
| 6 | |
| 7 #include "cc/layers/layer.h" | |
| 8 #include "cc/layers/picture_layer.h" | |
| 9 #include "cc/layers/solid_color_scrollbar_layer.h" | |
| 10 #include "cc/test/fake_picture_layer.h" | |
| 11 #include "cc/test/push_properties_counting_layer.h" | |
| 12 | |
| 13 namespace cc { | |
| 14 | |
| 15 RemoteClientLayerFactory::RemoteClientLayerFactory() = default; | |
| 16 | |
| 17 RemoteClientLayerFactory::~RemoteClientLayerFactory() = default; | |
| 18 | |
| 19 scoped_refptr<Layer> RemoteClientLayerFactory::CreateLayer( | |
| 20 int engine_layer_id) { | |
| 21 scoped_refptr<Layer> layer = Layer::Create(); | |
| 22 layer->SetLayerIdForTesting(engine_layer_id); | |
| 23 return layer; | |
| 24 } | |
| 25 | |
| 26 scoped_refptr<PictureLayer> RemoteClientLayerFactory::CreatePictureLayer( | |
| 27 int engine_layer_id, | |
| 28 ContentLayerClient* content_layer_client) { | |
| 29 scoped_refptr<PictureLayer> layer = | |
| 30 PictureLayer::Create(content_layer_client); | |
| 31 layer->SetLayerIdForTesting(engine_layer_id); | |
| 32 return layer; | |
| 33 } | |
| 34 | |
| 35 scoped_refptr<SolidColorScrollbarLayer> | |
| 36 RemoteClientLayerFactory::CreateSolidColorScrollbarLayer( | |
| 37 int engine_layer_id, | |
| 38 ScrollbarOrientation orientation, | |
| 39 int thumb_thickness, | |
| 40 int track_start, | |
| 41 bool is_left_side_vertical_scrollbar, | |
| 42 int scroll_layer_id) { | |
| 43 scoped_refptr<SolidColorScrollbarLayer> layer = | |
| 44 SolidColorScrollbarLayer::Create( | |
| 45 orientation, thumb_thickness, track_start, | |
| 46 is_left_side_vertical_scrollbar, scroll_layer_id); | |
| 47 layer->SetLayerIdForTesting(engine_layer_id); | |
| 48 return layer; | |
| 49 } | |
| 50 | |
| 51 scoped_refptr<PictureLayer> RemoteClientLayerFactory::CreateFakePictureLayer( | |
| 52 int engine_layer_id, | |
| 53 ContentLayerClient* content_layer_client) { | |
| 54 scoped_refptr<PictureLayer> layer = | |
| 55 FakePictureLayer::Create(content_layer_client); | |
| 56 layer->SetLayerIdForTesting(engine_layer_id); | |
| 57 return layer; | |
| 58 } | |
| 59 | |
| 60 scoped_refptr<Layer> | |
| 61 RemoteClientLayerFactory::CreatePushPropertiesCountingLayer( | |
| 62 int engine_layer_id) { | |
| 63 scoped_refptr<PushPropertiesCountingLayer> layer = | |
| 64 PushPropertiesCountingLayer::Create(); | |
| 65 layer->SetLayerIdForTesting(engine_layer_id); | |
| 66 return layer; | |
| 67 } | |
| 68 | |
| 69 } // namespace cc | |
| OLD | NEW |