| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 5 #ifndef CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class ContextProvider; | 14 class ContextProvider; |
| 15 class CopyOutputRequest; | 15 class CopyOutputRequest; |
| 16 class OutputSurface; | 16 class CompositorFrameSink; |
| 17 class SwapPromise; | 17 class SwapPromise; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace gpu { | 20 namespace gpu { |
| 21 class GpuChannelHost; | 21 class GpuChannelHost; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 class CompositorDependencies; | 25 class CompositorDependencies; |
| 26 | 26 |
| 27 // This class allows injection of LayoutTest-specific behaviour to the | 27 // This class allows injection of LayoutTest-specific behaviour to the |
| 28 // RenderThreadImpl. | 28 // RenderThreadImpl. |
| 29 class LayoutTestDependencies { | 29 class LayoutTestDependencies { |
| 30 public: | 30 public: |
| 31 virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface( | 31 virtual std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink( |
| 32 int32_t routing_id, | 32 int32_t routing_id, |
| 33 scoped_refptr<gpu::GpuChannelHost> gpu_channel, | 33 scoped_refptr<gpu::GpuChannelHost> gpu_channel, |
| 34 scoped_refptr<cc::ContextProvider> compositor_context_provider, | 34 scoped_refptr<cc::ContextProvider> compositor_context_provider, |
| 35 scoped_refptr<cc::ContextProvider> worker_context_provider, | 35 scoped_refptr<cc::ContextProvider> worker_context_provider, |
| 36 CompositorDependencies* deps) = 0; | 36 CompositorDependencies* deps) = 0; |
| 37 | 37 |
| 38 // Returns a SwapPromise which should be queued for the next compositor frame. | 38 // Returns a SwapPromise which should be queued for the next compositor frame. |
| 39 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 39 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
| 40 int32_t routing_id, | 40 int32_t routing_id, |
| 41 std::unique_ptr<cc::CopyOutputRequest> request) = 0; | 41 std::unique_ptr<cc::CopyOutputRequest> request) = 0; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace content | 44 } // namespace content |
| 45 | 45 |
| 46 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 46 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| OLD | NEW |