| 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/test/test_task_graph_runner.h" | 9 #include "cc/test/test_task_graph_runner.h" |
| 10 #include "cc/trees/layer_tree_host_client.h" | 10 #include "cc/trees/layer_tree_host_client.h" |
| 11 #include "cc/trees/layer_tree_host_single_thread_client.h" | 11 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 12 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 12 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class LayerTreeHost; | 15 class LayerTreeHost; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace blink { class WebLayer; } | 18 namespace blink { |
| 19 class WebCompositorAnimationTimeline; |
| 20 class WebLayer; |
| 21 } |
| 19 | 22 |
| 20 namespace content { | 23 namespace content { |
| 21 | 24 |
| 22 // Dummy WeblayerTeeView that does not support any actual compositing. | 25 // Dummy WeblayerTeeView that does not support any actual compositing. |
| 23 class WebLayerTreeViewImplForTesting | 26 class WebLayerTreeViewImplForTesting |
| 24 : public blink::WebLayerTreeView, | 27 : public blink::WebLayerTreeView, |
| 25 public cc::LayerTreeHostClient, | 28 public cc::LayerTreeHostClient, |
| 26 public cc::LayerTreeHostSingleThreadClient { | 29 public cc::LayerTreeHostSingleThreadClient { |
| 27 public: | 30 public: |
| 28 WebLayerTreeViewImplForTesting(); | 31 WebLayerTreeViewImplForTesting(); |
| 29 ~WebLayerTreeViewImplForTesting() override; | 32 ~WebLayerTreeViewImplForTesting() override; |
| 30 | 33 |
| 31 void Initialize(); | 34 void Initialize(bool use_compositor_animation_timelines); |
| 32 | 35 |
| 33 // blink::WebLayerTreeView implementation. | 36 // blink::WebLayerTreeView implementation. |
| 34 void setRootLayer(const blink::WebLayer& layer) override; | 37 void setRootLayer(const blink::WebLayer& layer) override; |
| 35 void clearRootLayer() override; | 38 void clearRootLayer() override; |
| 39 void attachCompositorAnimationTimeline( |
| 40 blink::WebCompositorAnimationTimeline*) override; |
| 41 void detachCompositorAnimationTimeline( |
| 42 blink::WebCompositorAnimationTimeline*) override; |
| 36 virtual void setViewportSize(const blink::WebSize& unused_deprecated, | 43 virtual void setViewportSize(const blink::WebSize& unused_deprecated, |
| 37 const blink::WebSize& device_viewport_size); | 44 const blink::WebSize& device_viewport_size); |
| 38 void setViewportSize(const blink::WebSize& device_viewport_size) override; | 45 void setViewportSize(const blink::WebSize& device_viewport_size) override; |
| 39 void setDeviceScaleFactor(float scale_factor) override; | 46 void setDeviceScaleFactor(float scale_factor) override; |
| 40 void setBackgroundColor(blink::WebColor) override; | 47 void setBackgroundColor(blink::WebColor) override; |
| 41 void setHasTransparentBackground(bool transparent) override; | 48 void setHasTransparentBackground(bool transparent) override; |
| 42 void setVisible(bool visible) override; | 49 void setVisible(bool visible) override; |
| 43 void setPageScaleFactorAndLimits(float page_scale_factor, | 50 void setPageScaleFactorAndLimits(float page_scale_factor, |
| 44 float minimum, | 51 float minimum, |
| 45 float maximum) override; | 52 float maximum) override; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 private: | 98 private: |
| 92 cc::TestTaskGraphRunner task_graph_runner_; | 99 cc::TestTaskGraphRunner task_graph_runner_; |
| 93 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 100 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 94 | 101 |
| 95 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); | 102 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImplForTesting); |
| 96 }; | 103 }; |
| 97 | 104 |
| 98 } // namespace content | 105 } // namespace content |
| 99 | 106 |
| 100 #endif // CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 107 #endif // CONTENT_TEST_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
| OLD | NEW |