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: |