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

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

Issue 18750003: Require ACK for editor-related changes not originating from browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 5 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 | « no previous file | 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_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 4a8319613f9b8b58b84cbab3ee8532bdd3299ec4..135b9e624b1d74bcb0d69467adec4d72848a888c 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -77,6 +77,11 @@ void InsertSyncPointAndAckForCompositor(
route_id, output_surface_id, renderer_host_id, ack);
}
+// Sends an acknowledgement to the renderer of a processed IME event.
+void SendImeEventAck(RenderWidgetHostImpl* host) {
+ host->Send(new ViewMsg_ImeEventAck(host->GetRoutingID()));
+}
+
} // anonymous namespace
RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
@@ -398,6 +403,13 @@ int RenderWidgetHostViewAndroid::GetNativeImeAdapter() {
void RenderWidgetHostViewAndroid::OnTextInputStateChanged(
const ViewHostMsg_TextInputState_Params& params) {
+#if defined(OS_ANDROID)
+ if (params.require_ack) {
+ // Regardless of how we exit from this method, we must acknowledge that we
+ // processed the input state change.
+ base::ScopedClosureRunner ack_caller(base::Bind(&SendImeEventAck, host_));
+ }
+#endif
if (!IsShowing())
return;
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698