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 WEBKIT_SUPPORT_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 5 #ifndef WEBKIT_SUPPORT_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
6 #define WEBKIT_SUPPORT_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 6 #define WEBKIT_SUPPORT_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 "third_party/WebKit/public/platform/WebLayerTreeView.h" | 10 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
11 #include "webkit/support/webkit_support.h" | 11 #include "webkit/support/webkit_support.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 class LayerTreeHost; | 14 class LayerTreeHost; |
15 class Thread; | |
16 } | 15 } |
17 | 16 |
18 namespace WebKit { class WebLayer; } | 17 namespace WebKit { class WebLayer; } |
19 | 18 |
20 namespace webkit { | 19 namespace webkit { |
21 | 20 |
22 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, | 21 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, |
23 public cc::LayerTreeHostClient { | 22 public cc::LayerTreeHostClient { |
24 public: | 23 public: |
25 WebLayerTreeViewImplForTesting( | 24 WebLayerTreeViewImplForTesting( |
26 webkit_support::LayerTreeViewType type, | 25 webkit_support::LayerTreeViewType type, |
27 webkit_support::DRTLayerTreeViewClient* client); | 26 webkit_support::DRTLayerTreeViewClient* client); |
28 virtual ~WebLayerTreeViewImplForTesting(); | 27 virtual ~WebLayerTreeViewImplForTesting(); |
29 | 28 |
30 bool Initialize(scoped_ptr<cc::Thread> compositor_thread); | 29 bool Initialize(); |
31 | 30 |
32 // WebKit::WebLayerTreeView implementation. | 31 // WebKit::WebLayerTreeView implementation. |
33 virtual void setSurfaceReady(); | 32 virtual void setSurfaceReady(); |
34 virtual void setRootLayer(const WebKit::WebLayer& layer); | 33 virtual void setRootLayer(const WebKit::WebLayer& layer); |
35 virtual void clearRootLayer(); | 34 virtual void clearRootLayer(); |
36 virtual void setViewportSize(const WebKit::WebSize& unused_deprecated, | 35 virtual void setViewportSize(const WebKit::WebSize& unused_deprecated, |
37 const WebKit::WebSize& device_viewport_size); | 36 const WebKit::WebSize& device_viewport_size); |
38 virtual WebKit::WebSize layoutViewportSize() const; | 37 virtual WebKit::WebSize layoutViewportSize() const; |
39 virtual WebKit::WebSize deviceViewportSize() const; | 38 virtual WebKit::WebSize deviceViewportSize() const; |
40 virtual void setDeviceScaleFactor(float scale_factor); | 39 virtual void setDeviceScaleFactor(float scale_factor); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 webkit_support::LayerTreeViewType type_; | 82 webkit_support::LayerTreeViewType type_; |
84 webkit_support::DRTLayerTreeViewClient* client_; | 83 webkit_support::DRTLayerTreeViewClient* client_; |
85 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 84 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
86 | 85 |
87 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); | 86 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); |
88 }; | 87 }; |
89 | 88 |
90 } // namespace webkit | 89 } // namespace webkit |
91 | 90 |
92 #endif // WEBKIT_SUPPORT_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 91 #endif // WEBKIT_SUPPORT_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
OLD | NEW |