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

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

Issue 22411008: Fix scoped of closer for ACK for editor-related changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unecessary ifdef Created 7 years, 4 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 | no next file » | 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 53a05f24fa4956bde4f2b93542a860a08a10e2d1..59822b28e787b3d39712fec01cec0f0c64cdb2e6 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -403,13 +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 an acknowledgement is required for this event, 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_));
+ if (!params.require_ack)
+ ack_caller.Release();
+
if (!IsShowing())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698