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

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

Issue 2626983003: IME for Mus: Send TextInputClient information to IMEDriver. (Closed)
Patch Set: Addressed feedback. 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..c066ee95f78c5c1c279459fe72da73e2fe756322 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,8 +125,16 @@ void InputMethodMus::OnDidChangeFocusedClient(
text_input_client_ = base::MakeUnique<TextInputClientImpl>(focused);
if (ime_server_) {
- ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(),
- MakeRequest(&input_method_));
+ ui::mojom::StartSessionDetailsPtr details =
+ ui::mojom::StartSessionDetails::New();
+ details->client = text_input_client_->CreateInterfacePtrAndBind();
+ details->input_method_request = MakeRequest(&input_method_);
+ details->text_input_type = focused->GetTextInputType();
+ details->text_input_mode = focused->GetTextInputMode();
+ details->text_direction = focused->GetTextDirection();
+ details->text_input_flags = focused->GetTextInputFlags();
+ details->caret_bounds = focused->GetCaretBounds();
+ ime_server_->StartSession(std::move(details));
}
}

Powered by Google App Engine
This is Rietveld 408576698