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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "ui/base/ime/text_input_client.h" | 8 #include "ui/base/ime/text_input_client.h" |
9 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 return DispatchFabricatedKeyEventPostIME(event.type(), | 87 return DispatchFabricatedKeyEventPostIME(event.type(), |
88 event.key_code(), | 88 event.key_code(), |
89 event.flags()); | 89 event.flags()); |
90 } | 90 } |
91 | 91 |
92 void InputMethodWin::OnInputLocaleChanged() { | 92 void InputMethodWin::OnInputLocaleChanged() { |
93 active_ = imm32_manager_.SetInputLanguage(); | 93 active_ = imm32_manager_.SetInputLanguage(); |
94 locale_ = imm32_manager_.GetInputLanguageName(); | 94 locale_ = imm32_manager_.GetInputLanguageName(); |
95 direction_ = imm32_manager_.GetTextDirection(); | 95 direction_ = imm32_manager_.GetTextDirection(); |
96 OnInputMethodChanged(); | 96 OnInputMethodChanged(); |
| 97 InputMethodBase::OnInputLocaleChanged(); |
97 } | 98 } |
98 | 99 |
99 std::string InputMethodWin::GetInputLocale() { | 100 std::string InputMethodWin::GetInputLocale() { |
100 return locale_; | 101 return locale_; |
101 } | 102 } |
102 | 103 |
103 base::i18n::TextDirection InputMethodWin::GetInputTextDirection() { | 104 base::i18n::TextDirection InputMethodWin::GetInputTextDirection() { |
104 return direction_; | 105 return direction_; |
105 } | 106 } |
106 | 107 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 // receiving keyboard input as long as it is an active window. This works well | 343 // receiving keyboard input as long as it is an active window. This works well |
343 // even when the |attached_window_handle| becomes active but has not received | 344 // even when the |attached_window_handle| becomes active but has not received |
344 // WM_FOCUS yet. | 345 // WM_FOCUS yet. |
345 return attached_window_handle && GetActiveWindow() == attached_window_handle; | 346 return attached_window_handle && GetActiveWindow() == attached_window_handle; |
346 #else | 347 #else |
347 return attached_window_handle && GetFocus() == attached_window_handle; | 348 return attached_window_handle && GetFocus() == attached_window_handle; |
348 #endif | 349 #endif |
349 } | 350 } |
350 | 351 |
351 } // namespace ui | 352 } // namespace ui |
OLD | NEW |