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

Unified Diff: ui/base/ime/remote_input_method_win.cc

Issue 85063002: Add OnCompositionChanged and OnTextCommitted to RemoteInputMethodPrivateWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « ui/base/ime/remote_input_method_win.h ('k') | ui/base/ime/remote_input_method_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/remote_input_method_win.cc
diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc
index 3f7ce8a1eba81fa01329acdc33a7987b38b93bb2..7fd1f089c6f37f7451ca290a1501bbe26a17ee36 100644
--- a/ui/base/ime/remote_input_method_win.cc
+++ b/ui/base/ime/remote_input_method_win.cc
@@ -343,6 +343,27 @@ class RemoteInputMethodWin : public InputMethod,
GetTextInputClient()->OnInputMethodChanged();
}
+ virtual void OnCompositionChanged(
+ const CompositionText& composition_text) OVERRIDE {
+ if (!text_input_client_)
+ return;
+ text_input_client_->SetCompositionText(composition_text);
+ }
+
+ virtual void OnTextCommitted(const base::string16& text) OVERRIDE {
+ if (!text_input_client_)
+ return;
+ if (text_input_client_->GetTextInputType() == TEXT_INPUT_TYPE_NONE) {
+ // According to the comment in text_input_client.h,
+ // TextInputClient::InsertText should never be called when the
+ // text input type is TEXT_INPUT_TYPE_NONE.
+ for (size_t i = 0; i < text.size(); ++i)
+ text_input_client_->InsertChar(text[i], 0);
+ return;
+ }
+ text_input_client_->InsertText(text);
+ }
+
bool CanSendRemoteNotification(
const TextInputClient* text_input_client) const {
return text_input_client_ &&
« no previous file with comments | « ui/base/ime/remote_input_method_win.h ('k') | ui/base/ime/remote_input_method_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698