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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2839993002: [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Created 3 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_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 08a77e2290a517292c0844a5ea6781195b74cf5b..839c3770fdf4e562c4b9a6cdf91a03c609e437a4 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -179,6 +179,7 @@
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCachePolicy.h"
#include "third_party/WebKit/public/platform/WebData.h"
+#include "third_party/WebKit/public/platform/WebFocusType.h"
#include "third_party/WebKit/public/platform/WebKeyboardEvent.h"
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "third_party/WebKit/public/platform/WebMediaPlayerSource.h"
@@ -1581,6 +1582,7 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
OnSetFrameOwnerProperties)
IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
+ IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocusInForm, OnAdvanceFocusInForm)
IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
OnTextTrackSettingsChanged)
@@ -2206,6 +2208,12 @@ void RenderFrameImpl::OnAdvanceFocus(blink::WebFocusType type,
type, source_frame->web_frame(), frame_);
}
+void RenderFrameImpl::OnAdvanceFocusInForm(bool forward) {
+ blink::WebFocusType focus_type =
+ forward ? blink::WebFocusTypeForward : blink::WebFocusTypeBackward;
+ render_view_->webview()->advanceFocusInForm(focus_type);
EhsanK 2017/04/25 22:43:08 Following nasko@'s suggestion I wonder if moving t
AKVT 2017/04/26 10:33:04 Done.
+}
+
void RenderFrameImpl::OnSetFocusedFrame() {
// This uses focusDocumentView rather than setFocusedFrame so that focus/blur
// events are properly dispatched on any currently focused elements.

Powered by Google App Engine
This is Rietveld 408576698