| 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 CompositorFrameSink; | 16 class CompositorFrameSink; |
| 17 class SharedBitmapManager; |
| 17 class SwapPromise; | 18 class SwapPromise; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace gpu { | 21 namespace gpu { |
| 21 class GpuChannelHost; | 22 class GpuChannelHost; |
| 23 class GpuMemoryBufferManager; |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace content { | 26 namespace content { |
| 25 class CompositorDependencies; | 27 class CompositorDependencies; |
| 26 | 28 |
| 27 // This class allows injection of LayoutTest-specific behaviour to the | 29 // This class allows injection of LayoutTest-specific behaviour to the |
| 28 // RenderThreadImpl. | 30 // RenderThreadImpl. |
| 29 class LayoutTestDependencies { | 31 class LayoutTestDependencies { |
| 30 public: | 32 public: |
| 31 virtual std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink( | 33 virtual std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink( |
| 32 int32_t routing_id, | 34 int32_t routing_id, |
| 33 scoped_refptr<gpu::GpuChannelHost> gpu_channel, | 35 scoped_refptr<gpu::GpuChannelHost> gpu_channel, |
| 34 scoped_refptr<cc::ContextProvider> compositor_context_provider, | 36 scoped_refptr<cc::ContextProvider> compositor_context_provider, |
| 35 scoped_refptr<cc::ContextProvider> worker_context_provider, | 37 scoped_refptr<cc::ContextProvider> worker_context_provider, |
| 38 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 36 CompositorDependencies* deps) = 0; | 39 CompositorDependencies* deps) = 0; |
| 37 | 40 |
| 38 // Returns a SwapPromise which should be queued for the next compositor frame. | 41 // Returns a SwapPromise which should be queued for the next compositor frame. |
| 39 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 42 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
| 40 int32_t routing_id, | 43 int32_t routing_id, |
| 41 std::unique_ptr<cc::CopyOutputRequest> request) = 0; | 44 std::unique_ptr<cc::CopyOutputRequest> request) = 0; |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 } // namespace content | 47 } // namespace content |
| 45 | 48 |
| 46 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 49 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| OLD | NEW |