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

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: Moved overridden function to correct location in header. 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 9e0c4207e80039bff552964d85310cd9972ffedf..b547b1988bf3a0560456e8b6a1aa40a5ed5d3fd1 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"
@@ -1284,6 +1285,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
+ IPC_MESSAGE_HANDLER(InputMsg_AdvanceFocusToNextFormControl,
+ OnAdvanceFocusToNextFormControl)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
@@ -1445,6 +1448,16 @@ void RenderViewImpl::OnSetHistoryOffsetAndLength(int history_offset,
history_list_length_ = history_length;
}
+void RenderViewImpl::OnAdvanceFocusToNextFormControl(bool forward) {
+ if (!webview())
+ return;
+
+ blink::WebFocusType focusType = blink::WebFocusTypeForward;
+ if (forward == false)
+ focusType = blink::WebFocusTypeBackward;
Avi (use Gerrit) 2015/04/17 16:26:38 Two comments before discarding this entire block.
AKV 2015/04/17 16:40:37 Done. Thanks
+ webview()->advanceFocusToNextFormControl(focusType);
+}
+
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