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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 ScreenInfo dummy_screen_info; | 352 ScreenInfo dummy_screen_info; |
353 cc::LayerTreeSettings settings = | 353 cc::LayerTreeSettings settings = |
354 RenderWidgetCompositor::GenerateLayerTreeSettings( | 354 RenderWidgetCompositor::GenerateLayerTreeSettings( |
355 *base::CommandLine::ForCurrentProcess(), deps, 1.f, | 355 *base::CommandLine::ForCurrentProcess(), deps, 1.f, |
356 dummy_screen_info); | 356 dummy_screen_info); |
357 | 357 |
358 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( | 358 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( |
359 std::move(compositor_context_provider), | 359 std::move(compositor_context_provider), |
360 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, | 360 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, |
361 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, | 361 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, |
362 synchronous_composite, false /* force_disable_reclaim_resources */); | 362 synchronous_composite); |
363 compositor_frame_sink->SetClient(this); | 363 compositor_frame_sink->SetClient(this); |
364 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); | 364 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); |
365 return std::move(compositor_frame_sink); | 365 return std::move(compositor_frame_sink); |
366 } | 366 } |
367 | 367 |
368 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 368 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
369 int32_t routing_id, | 369 int32_t routing_id, |
370 std::unique_ptr<cc::CopyOutputRequest> request) override { | 370 std::unique_ptr<cc::CopyOutputRequest> request) override { |
371 // Note that we can't immediately check compositor_frame_sinks_, since it | 371 // Note that we can't immediately check compositor_frame_sinks_, since it |
372 // may not have been created yet. Instead, we wait until OnCommit to find | 372 // may not have been created yet. Instead, we wait until OnCommit to find |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 } | 602 } |
603 | 603 |
604 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { | 604 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { |
605 if (auto* render_widget = | 605 if (auto* render_widget = |
606 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { | 606 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { |
607 render_widget->ShowVirtualKeyboard(); | 607 render_widget->ShowVirtualKeyboard(); |
608 } | 608 } |
609 } | 609 } |
610 | 610 |
611 } // namespace content | 611 } // namespace content |
OLD | NEW |