| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/public/test/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 ScreenInfo dummy_screen_info; | 347 ScreenInfo dummy_screen_info; |
| 348 cc::LayerTreeSettings settings = | 348 cc::LayerTreeSettings settings = |
| 349 RenderWidgetCompositor::GenerateLayerTreeSettings( | 349 RenderWidgetCompositor::GenerateLayerTreeSettings( |
| 350 *base::CommandLine::ForCurrentProcess(), deps, 1.f, | 350 *base::CommandLine::ForCurrentProcess(), deps, 1.f, |
| 351 dummy_screen_info); | 351 dummy_screen_info); |
| 352 | 352 |
| 353 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( | 353 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( |
| 354 std::move(compositor_context_provider), | 354 std::move(compositor_context_provider), |
| 355 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, | 355 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, |
| 356 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, | 356 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, |
| 357 synchronous_composite, false /* force_disable_reclaim_resources */); | 357 synchronous_composite); |
| 358 compositor_frame_sink->SetClient(this); | 358 compositor_frame_sink->SetClient(this); |
| 359 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); | 359 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); |
| 360 return std::move(compositor_frame_sink); | 360 return std::move(compositor_frame_sink); |
| 361 } | 361 } |
| 362 | 362 |
| 363 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 363 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
| 364 int32_t routing_id, | 364 int32_t routing_id, |
| 365 std::unique_ptr<cc::CopyOutputRequest> request) override { | 365 std::unique_ptr<cc::CopyOutputRequest> request) override { |
| 366 // Note that we can't immediately check compositor_frame_sinks_, since it | 366 // Note that we can't immediately check compositor_frame_sinks_, since it |
| 367 // may not have been created yet. Instead, we wait until OnCommit to find | 367 // may not have been created yet. Instead, we wait until OnCommit to find |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 } | 601 } |
| 602 } | 602 } |
| 603 | 603 |
| 604 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { | 604 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { |
| 605 RequestExtraData* extra_data = | 605 RequestExtraData* extra_data = |
| 606 static_cast<RequestExtraData*>(request.GetExtraData()); | 606 static_cast<RequestExtraData*>(request.GetExtraData()); |
| 607 return extra_data && extra_data->navigation_initiated_by_renderer(); | 607 return extra_data && extra_data->navigation_initiated_by_renderer(); |
| 608 } | 608 } |
| 609 | 609 |
| 610 } // namespace content | 610 } // namespace content |
| OLD | NEW |