Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: content/test/layouttest_support.cc

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Explicitly asking for TextInputState updates Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 #include "content/browser/renderer_host/render_widget_host_impl.h" 24 #include "content/browser/renderer_host/render_widget_host_impl.h"
25 #include "content/common/gpu/client/context_provider_command_buffer.h" 25 #include "content/common/gpu/client/context_provider_command_buffer.h"
26 #include "content/common/renderer.mojom.h" 26 #include "content/common/renderer.mojom.h"
27 #include "content/common/site_isolation_policy.h" 27 #include "content/common/site_isolation_policy.h"
28 #include "content/public/common/page_state.h" 28 #include "content/public/common/page_state.h"
29 #include "content/public/renderer/renderer_gamepad_provider.h" 29 #include "content/public/renderer/renderer_gamepad_provider.h"
30 #include "content/renderer/fetchers/manifest_fetcher.h" 30 #include "content/renderer/fetchers/manifest_fetcher.h"
31 #include "content/renderer/gpu/render_widget_compositor.h" 31 #include "content/renderer/gpu/render_widget_compositor.h"
32 #include "content/renderer/history_entry.h" 32 #include "content/renderer/history_entry.h"
33 #include "content/renderer/history_serialization.h" 33 #include "content/renderer/history_serialization.h"
34 #include "content/renderer/input/render_widget_input_handler_delegate.h"
34 #include "content/renderer/layout_test_dependencies.h" 35 #include "content/renderer/layout_test_dependencies.h"
35 #include "content/renderer/render_frame_impl.h" 36 #include "content/renderer/render_frame_impl.h"
36 #include "content/renderer/render_thread_impl.h" 37 #include "content/renderer/render_thread_impl.h"
37 #include "content/renderer/render_view_impl.h" 38 #include "content/renderer/render_view_impl.h"
38 #include "content/renderer/render_widget.h" 39 #include "content/renderer/render_widget.h"
39 #include "content/renderer/renderer_blink_platform_impl.h" 40 #include "content/renderer/renderer_blink_platform_impl.h"
40 #include "content/shell/common/shell_switches.h" 41 #include "content/shell/common/shell_switches.h"
41 #include "gpu/ipc/service/image_transport_surface.h" 42 #include "gpu/ipc/service/image_transport_surface.h"
42 #include "third_party/WebKit/public/platform/WebFloatRect.h" 43 #include "third_party/WebKit/public/platform/WebFloatRect.h"
43 #include "third_party/WebKit/public/platform/WebGamepads.h" 44 #include "third_party/WebKit/public/platform/WebGamepads.h"
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 result.append("===============================================\n"); 1123 result.append("===============================================\n");
1123 return result; 1124 return result;
1124 } 1125 }
1125 1126
1126 void SchedulerRunIdleTasks(const base::Closure& callback) { 1127 void SchedulerRunIdleTasks(const base::Closure& callback) {
1127 blink::scheduler::RendererScheduler* scheduler = 1128 blink::scheduler::RendererScheduler* scheduler =
1128 content::RenderThreadImpl::current()->GetRendererScheduler(); 1129 content::RenderThreadImpl::current()->GetRendererScheduler();
1129 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); 1130 blink::scheduler::RunIdleTasksForTesting(scheduler, callback);
1130 } 1131 }
1131 1132
1133 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) {
1134 if (auto* render_widget =
1135 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) {
1136 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED,
1137 ChangeSource::FROM_NON_IME);
1138 }
1139 }
1140
1132 } // namespace content 1141 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698