OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef UI_BASE_IME_INPUT_METHOD_WIN_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_WIN_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_WIN_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 void OnFocus() override; | 26 void OnFocus() override; |
27 void OnBlur() override; | 27 void OnBlur() override; |
28 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 28 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
29 NativeEventResult* result) override; | 29 NativeEventResult* result) override; |
30 bool DispatchKeyEvent(const ui::KeyEvent& event) override; | 30 bool DispatchKeyEvent(const ui::KeyEvent& event) override; |
31 void OnTextInputTypeChanged(const TextInputClient* client) override; | 31 void OnTextInputTypeChanged(const TextInputClient* client) override; |
32 void OnCaretBoundsChanged(const TextInputClient* client) override; | 32 void OnCaretBoundsChanged(const TextInputClient* client) override; |
33 void CancelComposition(const TextInputClient* client) override; | 33 void CancelComposition(const TextInputClient* client) override; |
34 void OnInputLocaleChanged() override; | 34 void OnInputLocaleChanged() override; |
35 std::string GetInputLocale() override; | 35 std::string GetInputLocale() override; |
36 bool IsActive() override; | |
37 bool IsCandidatePopupOpen() const override; | 36 bool IsCandidatePopupOpen() const override; |
38 | 37 |
39 protected: | 38 protected: |
40 // Overridden from InputMethodBase: | 39 // Overridden from InputMethodBase: |
41 // If a derived class overrides this method, it should call parent's | 40 // If a derived class overrides this method, it should call parent's |
42 // implementation. | 41 // implementation. |
43 void OnWillChangeFocusedClient(TextInputClient* focused_before, | 42 void OnWillChangeFocusedClient(TextInputClient* focused_before, |
44 TextInputClient* focused) override; | 43 TextInputClient* focused) override; |
45 void OnDidChangeFocusedClient(TextInputClient* focused_before, | 44 void OnDidChangeFocusedClient(TextInputClient* focused_before, |
46 TextInputClient* focused) override; | 45 TextInputClient* focused) override; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // pressing ctrl-shift. It'll be sent to the text input client when the key | 115 // pressing ctrl-shift. It'll be sent to the text input client when the key |
117 // is released. | 116 // is released. |
118 base::i18n::TextDirection pending_requested_direction_; | 117 base::i18n::TextDirection pending_requested_direction_; |
119 | 118 |
120 // Represents if WM_CHAR[wparam=='\r'] should be dispatched to the focused | 119 // Represents if WM_CHAR[wparam=='\r'] should be dispatched to the focused |
121 // text input client or ignored silently. This flag is introduced as a quick | 120 // text input client or ignored silently. This flag is introduced as a quick |
122 // workaround against crbug.com/319100 | 121 // workaround against crbug.com/319100 |
123 // TODO(yukawa, IME): Figure out long-term solution. | 122 // TODO(yukawa, IME): Figure out long-term solution. |
124 bool accept_carriage_return_; | 123 bool accept_carriage_return_; |
125 | 124 |
126 // Indicates if the current input locale has an IME. | |
127 bool active_; | |
128 | |
129 // True when an IME should be allowed to process key events. | 125 // True when an IME should be allowed to process key events. |
130 bool enabled_; | 126 bool enabled_; |
131 | 127 |
132 // True if we know for sure that a candidate window is open. | 128 // True if we know for sure that a candidate window is open. |
133 bool is_candidate_popup_open_; | 129 bool is_candidate_popup_open_; |
134 | 130 |
135 // Window handle where composition is on-going. NULL when there is no | 131 // Window handle where composition is on-going. NULL when there is no |
136 // composition. | 132 // composition. |
137 HWND composing_window_handle_; | 133 HWND composing_window_handle_; |
138 | 134 |
139 // Set to false initially. Tracks whether the IME has been initialized with | |
140 // the current input language. | |
141 // crbug.com/508668 | |
142 bool default_input_language_initialized_; | |
143 | |
144 // Set to true to suppress the next WM_CHAR, when the WM_KEYDOWN gets stopped | 135 // Set to true to suppress the next WM_CHAR, when the WM_KEYDOWN gets stopped |
145 // propagation (e.g. triggered an accelerator). | 136 // propagation (e.g. triggered an accelerator). |
146 bool suppress_next_char_; | 137 bool suppress_next_char_; |
147 | 138 |
148 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); | 139 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); |
149 }; | 140 }; |
150 | 141 |
151 } // namespace ui | 142 } // namespace ui |
152 | 143 |
153 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ | 144 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ |
OLD | NEW |