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 #ifndef CC_TEST_REMOTE_CLIENT_LAYER_FACTORY_H_ | |
6 #define CC_TEST_REMOTE_CLIENT_LAYER_FACTORY_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "cc/blimp/layer_factory.h" | |
10 | |
11 namespace cc { | |
12 | |
13 // An implementation of LayerFactory for tests that ensures that the layer id | |
14 // for layers created on the client matches the ids of the corresponding layers | |
15 // on the engine. | |
16 class RemoteClientLayerFactory : public LayerFactory { | |
17 public: | |
18 RemoteClientLayerFactory(); | |
19 ~RemoteClientLayerFactory() override; | |
20 | |
21 // LayerFactory implementation. | |
22 scoped_refptr<Layer> CreateLayer(int engine_layer_id) override; | |
23 scoped_refptr<PictureLayer> CreatePictureLayer( | |
24 int engine_layer_id, | |
25 ContentLayerClient* content_layer_client) override; | |
26 scoped_refptr<SolidColorScrollbarLayer> CreateSolidColorScrollbarLayer( | |
27 int engine_layer_id, | |
28 ScrollbarOrientation orientation, | |
29 int thumb_thickness, | |
30 int track_start, | |
31 bool is_left_side_vertical_scrollbar, | |
32 int scroll_layer_id) override; | |
33 scoped_refptr<PictureLayer> CreateFakePictureLayer( | |
34 int engine_layer_id, | |
35 ContentLayerClient* content_layer_client) override; | |
36 scoped_refptr<Layer> CreatePushPropertiesCountingLayer( | |
37 int engine_layer_id) override; | |
38 }; | |
39 | |
40 } // namespace cc | |
41 | |
42 #endif // CC_TEST_REMOTE_CLIENT_LAYER_FACTORY_H_ | |
OLD | NEW |