OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // input client. | 81 // input client. |
82 void ProcessInputMethodResult(const ui::KeyEvent& event, bool filtered); | 82 void ProcessInputMethodResult(const ui::KeyEvent& event, bool filtered); |
83 | 83 |
84 // Checks if the pending input method result needs inserting into the focused | 84 // Checks if the pending input method result needs inserting into the focused |
85 // text input client as a single character. | 85 // text input client as a single character. |
86 bool NeedInsertChar() const; | 86 bool NeedInsertChar() const; |
87 | 87 |
88 // Checks if there is pending input method result. | 88 // Checks if there is pending input method result. |
89 bool HasInputMethodResult() const; | 89 bool HasInputMethodResult() const; |
90 | 90 |
| 91 // Sends a fake key event for IME composing without physical key events. |
| 92 void SendFakeProcessKeyEvent(bool pressed) const; |
| 93 |
91 // Abandons all pending key events. It usually happends when we lose keyboard | 94 // Abandons all pending key events. It usually happends when we lose keyboard |
92 // focus, the text input type is changed or we are destroyed. | 95 // focus, the text input type is changed or we are destroyed. |
93 void AbandonAllPendingKeyEvents(); | 96 void AbandonAllPendingKeyEvents(); |
94 | 97 |
95 // Passes keyevent and executes character composition if necessary. Returns | 98 // Passes keyevent and executes character composition if necessary. Returns |
96 // true if character composer comsumes key event. | 99 // true if character composer comsumes key event. |
97 bool ExecuteCharacterComposer(const ui::KeyEvent& event); | 100 bool ExecuteCharacterComposer(const ui::KeyEvent& event); |
98 | 101 |
99 // chromeos::IMEInputContextHandlerInterface overrides: | 102 // chromeos::IMEInputContextHandlerInterface overrides: |
100 virtual void CommitText(const std::string& text) OVERRIDE; | 103 virtual void CommitText(const std::string& text) OVERRIDE; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 149 |
147 // Used for making callbacks. | 150 // Used for making callbacks. |
148 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; | 151 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; |
149 | 152 |
150 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); | 153 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); |
151 }; | 154 }; |
152 | 155 |
153 } // namespace ui | 156 } // namespace ui |
154 | 157 |
155 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ | 158 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
OLD | NEW |