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 3f5354e9d8d0c9aa078003121f4e0aaa39ebc751..ae5b05b1376c7932928e3387d7bbdff78d7bbcf0 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -654,19 +654,22 @@ long RenderWidgetHostViewAndroid::GetNativeImeAdapter() { |
return reinterpret_cast<intptr_t>(&ime_adapter_android_); |
} |
-void RenderWidgetHostViewAndroid::UpdateInputMethodIfNecessary( |
- bool text_input_state_changed) { |
- DCHECK(text_input_state_changed); |
+void RenderWidgetHostViewAndroid::TextInputStateChanged( |
+ const ViewHostMsg_TextInputState_Params& params) { |
+ if (params.is_non_ime_change) { |
+ // Sends an acknowledgement to the renderer of a processed IME event. |
+ host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID())); |
+ } |
+ |
if (!content_view_core_) |
return; |
- const TextInputState* state = host_->delegate()->GetTextInputState(); |
- |
content_view_core_->UpdateImeAdapter( |
- GetNativeImeAdapter(), static_cast<int>(state->type), state->flags, |
- state->value, state->selection_start, state->selection_end, |
- state->composition_start, state->composition_end, |
- state->show_ime_if_needed, state->is_non_ime_change); |
+ GetNativeImeAdapter(), |
+ static_cast<int>(params.type), params.flags, |
+ params.value, params.selection_start, params.selection_end, |
+ params.composition_start, params.composition_end, |
+ params.show_ime_if_needed, params.is_non_ime_change); |
} |
void RenderWidgetHostViewAndroid::UpdateBackgroundColor(SkColor color) { |
@@ -812,10 +815,6 @@ void RenderWidgetHostViewAndroid::Destroy() { |
} |
surface_factory_.reset(); |
- // The WebContentsImpl should be notified about us so that it will not hold |
- // an invalid text input state which was due to active text on this view. |
- NotifyHostDelegateAboutShutdown(); |
- |
// The RenderWidgetHost's destruction led here, so don't call it. |
host_ = NULL; |