Chromium Code Reviews| Index: ui/base/ime/input_method_tsf.cc |
| diff --git a/ui/base/ime/input_method_tsf.cc b/ui/base/ime/input_method_tsf.cc |
| index 41f0ba0600213ba7ce89f2f419c8965b7f3e231d..7623227dcae52c74b8862178e1970780658264cb 100644 |
| --- a/ui/base/ime/input_method_tsf.cc |
| +++ b/ui/base/ime/input_method_tsf.cc |
| @@ -10,7 +10,8 @@ namespace ui { |
| InputMethodTSF::InputMethodTSF(internal::InputMethodDelegate* delegate, |
| HWND toplevel_window_handle) |
| - : InputMethodWin(delegate, toplevel_window_handle) { |
| + : InputMethodWin(delegate, toplevel_window_handle), |
| + is_popup_open_(false) { |
| } |
| void InputMethodTSF::OnFocus() { |
| @@ -52,6 +53,10 @@ bool InputMethodTSF::OnUntranslatedIMEMessage( |
| original_result = OnDeadChar( |
| event.message, event.wParam, event.lParam, &handled); |
| break; |
| + case WM_IME_NOTIFY: |
|
Yohei Yukawa
2013/06/19 09:23:07
I guess WM_IME_NOTIFY is not supported on Metro mo
|
| + original_result = OnImeNotify( |
| + event.message, event.wParam, event.lParam, &handled); |
| + break; |
| } |
| if (result) |
| *result = original_result; |
| @@ -76,6 +81,10 @@ void InputMethodTSF::SetFocusedTextInputClient(TextInputClient* client) { |
| InputMethodWin::SetFocusedTextInputClient(client); |
| } |
| +bool InputMethodTSF::IsPopupOpen() const { |
| + return is_popup_open_; |
| +} |
| + |
| void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before, |
| TextInputClient* focused) { |
| NOTIMPLEMENTED(); |
| @@ -86,6 +95,25 @@ void InputMethodTSF::OnDidChangeFocusedClient(TextInputClient* focused_before, |
| NOTIMPLEMENTED(); |
| } |
| +LRESULT InputMethodTSF::OnImeNotify(UINT message, |
| + WPARAM wparam, |
| + LPARAM lparam, |
| + BOOL* handled) { |
| + *handled = FALSE; |
| + |
| + // Update |is_popup_open_|, whether a candidate window is open or not. |
| + switch (wparam) { |
| + case IMN_OPENCANDIDATE: |
| + is_popup_open_ = true; |
| + break; |
| + case IMN_CLOSECANDIDATE: |
| + is_popup_open_ = false; |
| + break; |
| + } |
| + |
| + return 0; |
| +} |
| + |
| void InputMethodTSF::ConfirmCompositionText() { |
| NOTIMPLEMENTED(); |
| } |