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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 3474007: Forward textfield focus event to the browser. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fixed merge conflict Created 10 years, 2 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
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.cc
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 5d65bffa2ba9352caf89629f9a6f3e5878564c3a..e4734b02bf9b694c2613feb49ef2eeb6922c03f3 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1849,8 +1849,22 @@ void RenderViewHost::NotifyRendererResponsive() {
delegate_->RendererResponsive(this);
}
-void RenderViewHost::OnMsgFocusedNodeChanged() {
+void RenderViewHost::OnMsgFocusedNodeChanged(bool is_editable_node) {
delegate_->FocusedNodeChanged();
+
+#if defined(TOUCH_UI)
+ if (is_editable_node) {
+ // Need to summon on-screen keyboard
+ // TODO(bryeung): implement this
+
+ // The currently focused element can be placed out of the view as the screen
+ // is now shared by the keyboard. Hence, we tell the renderer to scroll
+ // until the focused element comes in view.
+ Send(new ViewMsg_ScrollFocusedEditableNodeIntoView(routing_id()));
+ } else {
+ // TODO(bryeung): implement this. Should hide the on-screen keyboard.
+ }
+#endif
}
void RenderViewHost::OnMsgFocus() {
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698