OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/base/ime/input_method_auralinux.h" | 5 #include "ui/base/ime/input_method_auralinux.h" |
6 | 6 |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "ui/base/ime/linux/linux_input_method_context_factory.h" | 8 #include "ui/base/ime/linux/linux_input_method_context_factory.h" |
9 #include "ui/base/ime/text_input_client.h" | 9 #include "ui/base/ime/text_input_client.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 | 145 |
146 bool InputMethodAuraLinux::IsCandidatePopupOpen() const { | 146 bool InputMethodAuraLinux::IsCandidatePopupOpen() const { |
147 // There seems no way to detect candidate windows or any popups. | 147 // There seems no way to detect candidate windows or any popups. |
148 return false; | 148 return false; |
149 } | 149 } |
150 | 150 |
151 // Overriden from ui::LinuxInputMethodContextDelegate | 151 // Overriden from ui::LinuxInputMethodContextDelegate |
152 | 152 |
153 void InputMethodAuraLinux::OnCommit(const base::string16& text) { | 153 void InputMethodAuraLinux::OnCommit(const base::string16& text) { |
154 TextInputClient* text_input_client = GetTextInputClient(); | 154 TextInputClient* text_input_client = GetTextInputClient(); |
155 if (text_input_client) | 155 if (!IsTextInputTypeNone()) |
Yuki
2014/02/19 02:29:58
nit:
if (!IsTextInputTypeNone())
GetTextInpu
| |
156 text_input_client->InsertText(text); | 156 text_input_client->InsertText(text); |
157 } | 157 } |
158 | 158 |
159 void InputMethodAuraLinux::OnPreeditChanged( | 159 void InputMethodAuraLinux::OnPreeditChanged( |
160 const CompositionText& composition_text) { | 160 const CompositionText& composition_text) { |
161 TextInputClient* text_input_client = GetTextInputClient(); | 161 TextInputClient* text_input_client = GetTextInputClient(); |
162 if (text_input_client) | 162 if (text_input_client) |
163 text_input_client->SetCompositionText(composition_text); | 163 text_input_client->SetCompositionText(composition_text); |
164 } | 164 } |
165 | 165 |
(...skipping 11 matching lines...) Expand all Loading... | |
177 TextInputClient* focused_before, | 177 TextInputClient* focused_before, |
178 TextInputClient* focused) { | 178 TextInputClient* focused) { |
179 input_method_context_->Reset(); | 179 input_method_context_->Reset(); |
180 input_method_context_->OnTextInputTypeChanged( | 180 input_method_context_->OnTextInputTypeChanged( |
181 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE); | 181 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE); |
182 | 182 |
183 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); | 183 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); |
184 } | 184 } |
185 | 185 |
186 } // namespace ui | 186 } // namespace ui |
OLD | NEW |