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

Unified Diff: ui/aura/mus/input_method_mus.cc

Issue 2626983003: IME for Mus: Send TextInputClient information to IMEDriver. (Closed)
Patch Set: . Created 3 years, 11 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: ui/aura/mus/input_method_mus.cc
diff --git a/ui/aura/mus/input_method_mus.cc b/ui/aura/mus/input_method_mus.cc
index fdce89854b392e868af4091a7d5b98b6ac86f9d5..28844b734ca3a0a72c771e85c791396795d60b1f 100644
--- a/ui/aura/mus/input_method_mus.cc
+++ b/ui/aura/mus/input_method_mus.cc
@@ -92,9 +92,8 @@ void InputMethodMus::OnTextInputTypeChanged(const ui::TextInputClient* client) {
UpdateTextInputType();
InputMethodBase::OnTextInputTypeChanged(client);
- if (input_method_) {
+ if (input_method_)
input_method_->OnTextInputTypeChanged(client->GetTextInputType());
- }
}
void InputMethodMus::OnCaretBoundsChanged(const ui::TextInputClient* client) {
@@ -126,7 +125,15 @@ void InputMethodMus::OnDidChangeFocusedClient(
text_input_client_ = base::MakeUnique<TextInputClientImpl>(focused);
if (ime_server_) {
- ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(),
+ ui::mojom::TextInputClientInformationPtr client_info =
+ ui::mojom::TextInputClientInformation::New();
+ client_info->text_input_type = focused->GetTextInputType();
+ client_info->text_input_mode = focused->GetTextInputMode();
+ client_info->text_direction = focused->GetTextDirection();
+ client_info->text_input_flags = focused->GetTextInputFlags();
+ client_info->caret_bounds = focused->GetCaretBounds();
+ ime_server_->StartSession(std::move(client_info),
+ text_input_client_->CreateInterfacePtrAndBind(),
MakeRequest(&input_method_));
}
}
« services/ui/public/interfaces/ime/ime.mojom ('K') | « services/ui/public/interfaces/ime/ime.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698