OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "ui/base/ime/input_method_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <cwctype> | 9 #include <cwctype> |
10 | 10 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 if (text_input_type != TEXT_INPUT_TYPE_NONE && | 259 if (text_input_type != TEXT_INPUT_TYPE_NONE && |
260 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) { | 260 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) { |
261 GetEngine()->Reset(); | 261 GetEngine()->Reset(); |
262 } | 262 } |
263 | 263 |
264 if (enabled_) | 264 if (enabled_) |
265 imm32_manager_.CancelIME(toplevel_window_handle_); | 265 imm32_manager_.CancelIME(toplevel_window_handle_); |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 void InputMethodWin::OnInputLocaleChanged() { | 269 void InputMethodWin::OnInputLocaleChanged() { |
yukawa
2016/09/01 20:15:03
We probably may want to add a TODO for this method
Shu Chen
2016/09/07 03:13:34
Done.
| |
270 // Note: OnInputLocaleChanged() is for crbug.com/168971. | 270 // Note: OnInputLocaleChanged() is for crbug.com/168971. |
yukawa
2016/09/01 20:15:03
We may want to update this line because we basical
Shu Chen
2016/09/07 03:13:34
Done.
| |
271 OnInputMethodChanged(); | 271 OnInputMethodChanged(); |
272 imm32_manager_.SetInputLanguage(); | |
272 } | 273 } |
273 | 274 |
274 std::string InputMethodWin::GetInputLocale() { | 275 bool InputMethodWin::IsInputLocaleCJK() const { |
275 return imm32_manager_.GetInputLanguageName(); | 276 return imm32_manager_.IsInputLanguageCJK(); |
276 } | 277 } |
277 | 278 |
278 bool InputMethodWin::IsCandidatePopupOpen() const { | 279 bool InputMethodWin::IsCandidatePopupOpen() const { |
279 return is_candidate_popup_open_; | 280 return is_candidate_popup_open_; |
280 } | 281 } |
281 | 282 |
282 void InputMethodWin::OnWillChangeFocusedClient(TextInputClient* focused_before, | 283 void InputMethodWin::OnWillChangeFocusedClient(TextInputClient* focused_before, |
283 TextInputClient* focused) { | 284 TextInputClient* focused) { |
284 if (IsWindowFocused(focused_before)) | 285 if (IsWindowFocused(focused_before)) |
285 ConfirmCompositionText(); | 286 ConfirmCompositionText(); |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
705 ui::IMEEngineHandlerInterface* engine = GetEngine(); | 706 ui::IMEEngineHandlerInterface* engine = GetEngine(); |
706 if (engine) { | 707 if (engine) { |
707 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE) | 708 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE) |
708 engine->FocusOut(); | 709 engine->FocusOut(); |
709 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) | 710 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) |
710 engine->FocusIn(context); | 711 engine->FocusIn(context); |
711 } | 712 } |
712 } | 713 } |
713 | 714 |
714 } // namespace ui | 715 } // namespace ui |
OLD | NEW |