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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1080693002: Implementation of Smart GO NEXT feature in Android Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated based on blink side reviews. Created 5 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 66d2c0d45daa14ace02dee5f2bdec6516e07ae3f..2a8b4f286b4064b9b16b7ba1115392b97d60c503 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -113,6 +113,7 @@
#include "third_party/WebKit/public/platform/WebCString.h"
#include "third_party/WebKit/public/platform/WebConnectionType.h"
#include "third_party/WebKit/public/platform/WebDragData.h"
+#include "third_party/WebKit/public/platform/WebFocusType.h"
#include "third_party/WebKit/public/platform/WebHTTPBody.h"
#include "third_party/WebKit/public/platform/WebImage.h"
#include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
@@ -1285,6 +1286,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
+ IPC_MESSAGE_HANDLER(InputMsg_AdvanceFocusInForm, OnAdvanceFocusInForm)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
@@ -1446,6 +1448,15 @@ void RenderViewImpl::OnSetHistoryOffsetAndLength(int history_offset,
history_list_length_ = history_length;
}
+void RenderViewImpl::OnAdvanceFocusInForm(bool forward) {
+ if (!webview())
+ return;
+
+ blink::WebFocusType focus_type =
+ forward ? blink::WebFocusTypeForward : blink::WebFocusTypeBackward;
+ webview()->advanceFocusInForm(focus_type);
+}
+
void RenderViewImpl::OnSetInitialFocus(bool reverse) {
if (!webview())
return;
« content/browser/web_contents/web_contents_impl.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698