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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 626983002: Eliminate redundant IPC used for showing the Windows virtual keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ed5cc127b505814522cb614fb8d6a5090aa35340..3e5e25fca08b3f356a1be186a00de49308916aa1 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -832,7 +832,6 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
- IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(
handled = RenderWidgetHostImpl::OnMessageReceived(msg))
@@ -1143,12 +1142,21 @@ void RenderViewHostImpl::OnTakeFocus(bool reverse) {
view->TakeFocus(reverse);
}
-void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node) {
+void RenderViewHostImpl::OnFocusedNodeChanged(
+ bool is_editable_node,
+ blink::WebInputEvent::Type causel_event_type) {
is_focused_element_editable_ = is_editable_node;
if (view_)
view_->FocusedNodeChanged(is_editable_node);
#if defined(OS_WIN)
- if (!is_editable_node && virtual_keyboard_requested_) {
+ if (causal_event_type == blink::WebInputEvent::GestureTap) {
+ if (is_editable_node) {
+ virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard();
+ } else {
+ virtual_keyboard_requested_ = false;
+ base::win::DismissVirtualKeyboard();
+ }
+ } else if (!is_editable_node && virtual_keyboard_requested_) {
virtual_keyboard_requested_ = false;
BrowserThread::PostDelayedTask(
BrowserThread::UI, FROM_HERE,
@@ -1363,17 +1371,6 @@ void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
delegate_->RunFileChooser(this, params);
}
-void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
-#if defined(OS_WIN)
- if (editable) {
- virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard();
- } else {
- virtual_keyboard_requested_ = false;
- base::win::DismissVirtualKeyboard();
- }
-#endif
-}
-
bool RenderViewHostImpl::CanAccessFilesOfPageState(
const PageState& state) const {
ChildProcessSecurityPolicyImpl* policy =
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698