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

Unified Diff: content/renderer/render_widget.cc

Issue 1278593004: Introduce ThreadedInputConnection behind a switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 3d83dd8188937346e9ce7698e7f7059b7226f4be..1107eaf6ceb7bbda6dacdd3a826f361c2509ef69 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -734,6 +734,8 @@ bool RenderWidget::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
IPC_MESSAGE_HANDLER(ViewMsg_SetSurfaceIdNamespace, OnSetSurfaceIdNamespace)
#if defined(OS_ANDROID)
+ IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate,
+ RequestTextInputStateUpdate)
IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded)
IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck)
#endif
@@ -1772,6 +1774,11 @@ void RenderWidget::OnImeEventAck() {
--outstanding_ime_acks_;
DCHECK(outstanding_ime_acks_ >= 0);
}
+
+void RenderWidget::RequestTextInputStateUpdate() {
+ LOG(ERROR) << "cr.Ime RequestTextInputStateUpdate";
+ ImeEventGuard guard(this);
+}
#endif
bool RenderWidget::ShouldHandleImeEvent() {
@@ -1877,7 +1884,6 @@ static bool IsDateTimeInput(ui::TextInputType type) {
type == ui::TEXT_INPUT_TYPE_WEEK;
}
-
void RenderWidget::StartHandlingImeEvent() {
DCHECK(!handling_ime_event_);
handling_ime_event_ = true;
@@ -1900,6 +1906,9 @@ void RenderWidget::UpdateTextInputState(ShowIme show_ime,
TRACE_EVENT0("renderer", "RenderWidget::UpdateTextInputState");
if (handling_ime_event_)
return;
+ if (change_source == FROM_IME) {
+ LOG(ERROR) << "cr.Ime UpdateTextInputState FROM_IME";
+ }
ui::TextInputType new_type = GetTextInputType();
if (IsDateTimeInput(new_type))
return; // Not considered as a text input field in WebKit/Chromium.
@@ -1913,9 +1922,8 @@ void RenderWidget::UpdateTextInputState(ShowIme show_ime,
// Only sends text input params if they are changed or if the ime should be
// shown.
- if (show_ime == SHOW_IME_IF_NEEDED ||
- (text_input_type_ != new_type ||
- text_input_mode_ != new_mode ||
+ if (show_ime == SHOW_IME_IF_NEEDED || change_source == FROM_IME ||
+ (text_input_type_ != new_type || text_input_mode_ != new_mode ||
text_input_info_ != new_info ||
can_compose_inline_ != new_can_compose_inline)
#if defined(OS_ANDROID)
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698