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 CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 5 #ifndef CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
6 #define CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 6 #define CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/trees/layer_tree_host_client.h" | 9 #include "cc/trees/layer_tree_host_client.h" |
| 10 #include "cc/trees/layer_tree_host_single_thread_client.h" |
10 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 11 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 class LayerTreeHost; | 14 class LayerTreeHost; |
14 } | 15 } |
15 | 16 |
16 namespace WebKit { class WebLayer; } | 17 namespace WebKit { class WebLayer; } |
17 | 18 |
18 namespace webkit { | 19 namespace webkit { |
19 | 20 |
20 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, | 21 class WebLayerTreeViewImplForTesting |
21 public cc::LayerTreeHostClient { | 22 : public WebKit::WebLayerTreeView, |
| 23 public cc::LayerTreeHostClient, |
| 24 public cc::LayerTreeHostSingleThreadClient { |
22 public: | 25 public: |
23 WebLayerTreeViewImplForTesting(); | 26 WebLayerTreeViewImplForTesting(); |
24 virtual ~WebLayerTreeViewImplForTesting(); | 27 virtual ~WebLayerTreeViewImplForTesting(); |
25 | 28 |
26 bool Initialize(); | 29 bool Initialize(); |
27 | 30 |
28 // WebKit::WebLayerTreeView implementation. | 31 // WebKit::WebLayerTreeView implementation. |
29 virtual void setSurfaceReady(); | 32 virtual void setSurfaceReady(); |
30 virtual void setRootLayer(const WebKit::WebLayer& layer); | 33 virtual void setRootLayer(const WebKit::WebLayer& layer); |
31 virtual void clearRootLayer(); | 34 virtual void clearRootLayer(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual void Layout() OVERRIDE; | 66 virtual void Layout() OVERRIDE; |
64 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, float page_scale) | 67 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, float page_scale) |
65 OVERRIDE; | 68 OVERRIDE; |
66 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) | 69 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) |
67 OVERRIDE; | 70 OVERRIDE; |
68 virtual void DidInitializeOutputSurface(bool success) OVERRIDE {} | 71 virtual void DidInitializeOutputSurface(bool success) OVERRIDE {} |
69 virtual void WillCommit() OVERRIDE {} | 72 virtual void WillCommit() OVERRIDE {} |
70 virtual void DidCommit() OVERRIDE {} | 73 virtual void DidCommit() OVERRIDE {} |
71 virtual void DidCommitAndDrawFrame() OVERRIDE {} | 74 virtual void DidCommitAndDrawFrame() OVERRIDE {} |
72 virtual void DidCompleteSwapBuffers() OVERRIDE {} | 75 virtual void DidCompleteSwapBuffers() OVERRIDE {} |
73 virtual void ScheduleComposite() OVERRIDE; | |
74 virtual scoped_refptr<cc::ContextProvider> | 76 virtual scoped_refptr<cc::ContextProvider> |
75 OffscreenContextProvider() OVERRIDE; | 77 OffscreenContextProvider() OVERRIDE; |
76 | 78 |
| 79 // cc::LayerTreeHostSingleThreadClient implementation. |
| 80 virtual void ScheduleComposite() OVERRIDE {} |
| 81 virtual void DidPostSwapBuffers() OVERRIDE {} |
| 82 virtual void DidAbortSwapBuffers() OVERRIDE {} |
| 83 |
77 private: | 84 private: |
78 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 85 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
79 | 86 |
80 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); | 87 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); |
81 }; | 88 }; |
82 | 89 |
83 } // namespace webkit | 90 } // namespace webkit |
84 | 91 |
85 #endif // CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 92 #endif // CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
OLD | NEW |