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

Unified Diff: components/arc/ime/arc_ime_service.cc

Issue 2039233003: Showing virtual keyboard when input type changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ImeHost.ShowImeIfNeeded to ARC bridge Created 4 years, 6 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 | « components/arc/ime/arc_ime_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/ime/arc_ime_service.cc
diff --git a/components/arc/ime/arc_ime_service.cc b/components/arc/ime/arc_ime_service.cc
index 3e4e4da932d13f4cb61a9b6306c4a0731139f688..bec0b25e020f6723d39c5c099476a1f60e6f5af1 100644
--- a/components/arc/ime/arc_ime_service.cc
+++ b/components/arc/ime/arc_ime_service.cc
@@ -133,13 +133,10 @@ void ArcImeService::OnTextInputTypeChanged(ui::TextInputType type) {
ui::InputMethod* const input_method = GetInputMethod();
if (input_method) {
input_method->OnTextInputTypeChanged(this);
+ // TODO(crbug.com/581282): Remove this piggyback call when
+ // ImeInstance::ShowImeIfNeeded is wired to ARC.
if (input_method->GetTextInputClient() == this &&
ime_type_ != ui::TEXT_INPUT_TYPE_NONE) {
dcheng 2016/06/14 08:39:52 So the final intent is to remove this once all the
takaoka 2016/06/14 09:04:25 Yes. This can be removed once the corresponding CL
- // TODO(kinaba): crbug.com/581282. This is tentative short-term solution.
- //
- // For fully correct implementation, rather than to piggyback the "show"
- // request with the input type change, we need dedicated IPCs to share the
- // virtual keyboard show/hide states between Chromium and ARC.
input_method->ShowImeIfNeeded();
}
}
@@ -161,6 +158,13 @@ void ArcImeService::OnCancelComposition() {
input_method->CancelComposition(this);
}
+void ArcImeService::ShowImeIfNeeded() {
+ ui::InputMethod* const input_method = GetInputMethod();
+ if (input_method && input_method->GetTextInputClient() == this) {
+ input_method->ShowImeIfNeeded();
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// Oberridden from ui::TextInputClient:
« no previous file with comments | « components/arc/ime/arc_ime_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698