| 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" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "cc/output/copy_output_request.h" | 16 #include "cc/output/copy_output_request.h" |
| 17 #include "cc/test/pixel_test_output_surface.h" | 17 #include "cc/test/pixel_test_output_surface.h" |
| 18 #include "cc/test/test_compositor_frame_sink.h" | 18 #include "cc/test/test_compositor_frame_sink.h" |
| 19 #include "components/test_runner/test_common.h" | 19 #include "components/test_runner/test_common.h" |
| 20 #include "components/test_runner/web_frame_test_proxy.h" | 20 #include "components/test_runner/web_frame_test_proxy.h" |
| 21 #include "components/test_runner/web_view_test_proxy.h" | 21 #include "components/test_runner/web_view_test_proxy.h" |
| 22 #include "components/test_runner/web_widget_test_proxy.h" | 22 #include "components/test_runner/web_widget_test_proxy.h" |
| 23 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" | 23 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" |
| 24 #include "content/browser/renderer_host/render_process_host_impl.h" | 24 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 25 #include "content/browser/renderer_host/render_widget_host_impl.h" | 25 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 26 #include "content/child/request_extra_data.h" |
| 26 #include "content/common/renderer.mojom.h" | 27 #include "content/common/renderer.mojom.h" |
| 27 #include "content/public/common/page_state.h" | 28 #include "content/public/common/page_state.h" |
| 28 #include "content/public/common/screen_info.h" | 29 #include "content/public/common/screen_info.h" |
| 29 #include "content/public/renderer/renderer_gamepad_provider.h" | 30 #include "content/public/renderer/renderer_gamepad_provider.h" |
| 30 #include "content/renderer/fetchers/manifest_fetcher.h" | 31 #include "content/renderer/fetchers/manifest_fetcher.h" |
| 31 #include "content/renderer/gpu/render_widget_compositor.h" | 32 #include "content/renderer/gpu/render_widget_compositor.h" |
| 32 #include "content/renderer/history_entry.h" | 33 #include "content/renderer/history_entry.h" |
| 33 #include "content/renderer/history_serialization.h" | 34 #include "content/renderer/history_serialization.h" |
| 34 #include "content/renderer/input/render_widget_input_handler_delegate.h" | 35 #include "content/renderer/input/render_widget_input_handler_delegate.h" |
| 35 #include "content/renderer/layout_test_dependencies.h" | 36 #include "content/renderer/layout_test_dependencies.h" |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); | 598 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); |
| 598 } | 599 } |
| 599 | 600 |
| 600 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { | 601 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { |
| 601 if (auto* render_widget = | 602 if (auto* render_widget = |
| 602 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { | 603 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { |
| 603 render_widget->ShowVirtualKeyboard(); | 604 render_widget->ShowVirtualKeyboard(); |
| 604 } | 605 } |
| 605 } | 606 } |
| 606 | 607 |
| 608 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { |
| 609 RequestExtraData* extra_data = static_cast<RequestExtraData*>( |
| 610 request.getExtraData()); |
| 611 return extra_data && extra_data->navigation_initiated_by_renderer(); |
| 612 } |
| 613 |
| 607 } // namespace content | 614 } // namespace content |
| OLD | NEW |