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

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: Enabling GO button even if we have Previous element available. 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 f524896b2a2dc09cfcaf91744335f5becf7f6287..2a842b6d2e83db1a1c140430a1a5193afe48dfe8 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"
@@ -226,6 +227,7 @@ using blink::WebDragData;
using blink::WebDragOperation;
using blink::WebDragOperationsMask;
using blink::WebElement;
+using blink::WebFocusType;
jdduke (slow) 2015/04/15 18:42:46 We only use this once, don't think it merits a usi
AKV 2015/04/17 15:48:16 Done.
using blink::WebFileChooserCompletion;
using blink::WebFindOptions;
using blink::WebFormControlElement;
@@ -1262,6 +1264,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
+ IPC_MESSAGE_HANDLER(InputMsg_AdvanceFocusToNextInputField,
+ OnAdvanceFocusToNextInputField)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
@@ -1423,6 +1427,16 @@ void RenderViewImpl::OnSetHistoryOffsetAndLength(int history_offset,
history_list_length_ = history_length;
}
+void RenderViewImpl::OnAdvanceFocusToNextInputField(bool forward) {
+ if (!webview())
+ return;
+
+ WebFocusType focusType = blink::WebFocusTypeForward;
+ if (forward == false)
+ focusType = blink::WebFocusTypeBackward;
+ webview()->advanceFocusToNextInputField(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