| Index: ui/views/ime/input_method_win.cc
|
| diff --git a/ui/views/ime/input_method_win.cc b/ui/views/ime/input_method_win.cc
|
| old mode 100644
|
| new mode 100755
|
| index 35c0a4252723dfe63c4da6deb70da5faf6839614..1cd18d8ac66e44876a6e972663ebd1e05f6f0198
|
| --- a/ui/views/ime/input_method_win.cc
|
| +++ b/ui/views/ime/input_method_win.cc
|
| @@ -27,6 +27,7 @@ InputMethodWin::InputMethodWin(internal::InputMethodDelegate* delegate,
|
| ui::InputMethod* host)
|
| : hwnd_(hwnd),
|
| active_(false),
|
| + is_candidate_popup_open_(false),
|
| direction_(base::i18n::UNKNOWN_DIRECTION),
|
| pending_requested_direction_(base::i18n::UNKNOWN_DIRECTION),
|
| host_(host) {
|
| @@ -78,6 +79,10 @@ bool InputMethodWin::OnUntranslatedIMEMessage(const base::NativeEvent& event,
|
| original_result = OnImeRequest(
|
| event.message, event.wParam, event.lParam, &handled);
|
| break;
|
| + case WM_IME_NOTIFY:
|
| + original_result = OnImeNotify(
|
| + event.message, event.wParam, event.lParam, &handled);
|
| + break;
|
| case WM_CHAR:
|
| case WM_SYSCHAR:
|
| original_result = OnChar(
|
| @@ -167,6 +172,10 @@ ui::TextInputClient* InputMethodWin::GetTextInputClient() const {
|
| return host_ ? host_->GetTextInputClient() : NULL;
|
| }
|
|
|
| +bool InputMethodWin::IsCandidatePopupOpen() const {
|
| + return is_candidate_popup_open_;
|
| +}
|
| +
|
| void InputMethodWin::OnWillChangeFocus(View* focused_before, View* focused) {
|
| ConfirmCompositionText();
|
| }
|
| @@ -274,6 +283,23 @@ LRESULT InputMethodWin::OnImeRequest(
|
| }
|
| }
|
|
|
| +LRESULT InputMethodWin::OnImeNotify(
|
| + UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled) {
|
| + *handled = FALSE;
|
| +
|
| + // Update |is_candidate_popup_open_|, whether a candidate window is open.
|
| + switch (wparam) {
|
| + case IMN_OPENCANDIDATE:
|
| + is_candidate_popup_open_ = true;
|
| + break;
|
| + case IMN_CLOSECANDIDATE:
|
| + is_candidate_popup_open_ = false;
|
| + break;
|
| + }
|
| +
|
| + return 0;
|
| +}
|
| +
|
| LRESULT InputMethodWin::OnChar(
|
| UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled) {
|
| *handled = TRUE;
|
|
|