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_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "cc/test/fake_layer_tree_host_impl.h" | 9 #include "cc/test/fake_layer_tree_host_impl.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 class TaskGraphRunner; | 12 class TaskGraphRunner; |
13 | 13 |
14 class FakeUIResourceLayerTreeHostImpl : public FakeLayerTreeHostImpl { | 14 class FakeUIResourceLayerTreeHostImpl : public FakeLayerTreeHostImpl { |
15 public: | 15 public: |
16 explicit FakeUIResourceLayerTreeHostImpl(Proxy* proxy, | 16 explicit FakeUIResourceLayerTreeHostImpl( |
17 SharedBitmapManager* manager, | 17 TaskRunnerProvider* task_runner_provider, |
18 TaskGraphRunner* task_graph_runner); | 18 SharedBitmapManager* manager, |
| 19 TaskGraphRunner* task_graph_runner); |
19 ~FakeUIResourceLayerTreeHostImpl() override; | 20 ~FakeUIResourceLayerTreeHostImpl() override; |
20 | 21 |
21 void CreateUIResource(UIResourceId uid, | 22 void CreateUIResource(UIResourceId uid, |
22 const UIResourceBitmap& bitmap) override; | 23 const UIResourceBitmap& bitmap) override; |
23 | 24 |
24 void DeleteUIResource(UIResourceId uid) override; | 25 void DeleteUIResource(UIResourceId uid) override; |
25 | 26 |
26 ResourceId ResourceIdForUIResource(UIResourceId uid) const override; | 27 ResourceId ResourceIdForUIResource(UIResourceId uid) const override; |
27 | 28 |
28 bool IsUIResourceOpaque(UIResourceId uid) const override; | 29 bool IsUIResourceOpaque(UIResourceId uid) const override; |
29 | 30 |
30 private: | 31 private: |
31 typedef base::hash_map<UIResourceId, LayerTreeHostImpl::UIResourceData> | 32 typedef base::hash_map<UIResourceId, LayerTreeHostImpl::UIResourceData> |
32 UIResourceMap; | 33 UIResourceMap; |
33 UIResourceMap fake_ui_resource_map_; | 34 UIResourceMap fake_ui_resource_map_; |
34 }; | 35 }; |
35 | 36 |
36 } // namespace cc | 37 } // namespace cc |
37 | 38 |
38 #endif // CC_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ | 39 #endif // CC_TEST_FAKE_UI_RESOURCE_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |