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

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

Issue 1895523002: Revert of Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 46113c71a41378de43bc01db2ce14fbdba0d22a1..acb9d446490d808e0669d3f9aa1abc3456dcc0e6 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -652,19 +652,22 @@
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) {
@@ -809,10 +812,6 @@
surface_id_ = cc::SurfaceId();
}
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;

Powered by Google App Engine
This is Rietveld 408576698