Teach render_host about a mojo WidgetInputHandler.
Implement a WidgetInputHandler as a legacy interface over Chrome IPC.
This will then allow us to dynamically swap it with a mojo backed one.
This change does not provide a mojo backed implementation of this
interface but just an implementation of the interface backed by Chrome IPC.
The new implementation will come in another CL.
BUG=722928
[email protected]
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I03bb42524cec501a8b76f517629e0b3e3e76bba0
Reviewed-on: https://chromium-review.googlesource.com/541036
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Cr-Commit-Position: refs/heads/master@{#484707}
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index d0f55d4..bc40880 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1149,10 +1149,6 @@
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
- IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
- IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
- IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
- OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
@@ -1243,26 +1239,7 @@
target_url_status_ = TARGET_NONE;
}
-void RenderViewImpl::OnExecuteEditCommand(const std::string& name,
- const std::string& value) {
- if (!webview() || !webview()->FocusedFrame())
- return;
-
- webview()->FocusedFrame()->ExecuteCommand(WebString::FromUTF8(name),
- WebString::FromUTF8(value));
-}
-
-void RenderViewImpl::OnMoveCaret(const gfx::Point& point) {
- if (!webview())
- return;
-
- Send(new InputHostMsg_MoveCaret_ACK(GetRoutingID()));
- webview()->FocusedFrame()->MoveCaretSelection(
- ConvertWindowPointToViewport(point));
-}
-
-void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect(
- const gfx::Rect& rect) {
+void RenderViewImpl::ScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect) {
blink::WebAutofillClient* autofill_client = nullptr;
if (auto* focused_frame = GetWebView()->FocusedFrame())
autofill_client = focused_frame->AutofillClient();