| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 gpu_channel_ = gpu_channel; | 340 gpu_channel_ = gpu_channel; |
| 341 | 341 |
| 342 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get(); | 342 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get(); |
| 343 bool synchronous_composite = !task_runner; | 343 bool synchronous_composite = !task_runner; |
| 344 if (!task_runner) | 344 if (!task_runner) |
| 345 task_runner = base::ThreadTaskRunnerHandle::Get().get(); | 345 task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
| 346 | 346 |
| 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, false, |
| 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, false /* force_disable_reclaim_resources */); |
| 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); |
| (...skipping 240 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 |