OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AURALINUX_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/base/ime/composition_text.h" | 10 #include "ui/base/ime/composition_text.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 TextInputClient* focused) override; | 50 TextInputClient* focused) override; |
51 | 51 |
52 private: | 52 private: |
53 bool HasInputMethodResult(); | 53 bool HasInputMethodResult(); |
54 bool NeedInsertChar() const; | 54 bool NeedInsertChar() const; |
55 ui::EventDispatchDetails SendFakeProcessKeyEvent(ui::KeyEvent* event) const; | 55 ui::EventDispatchDetails SendFakeProcessKeyEvent(ui::KeyEvent* event) const; |
56 void ConfirmCompositionText(); | 56 void ConfirmCompositionText(); |
57 void UpdateContextFocusState(); | 57 void UpdateContextFocusState(); |
58 void ResetContext(); | 58 void ResetContext(); |
59 | 59 |
60 // Processes the key event after passing to extension. | |
61 void ProcessKeyEventDone(ui::KeyEvent* event, bool filtered, bool is_handled); | |
62 | |
60 // Callback function for IMEEngineHandlerInterface::ProcessKeyEvent. | 63 // Callback function for IMEEngineHandlerInterface::ProcessKeyEvent. |
61 void ProcessKeyEventDone(ui::KeyEvent* event, bool filtered, bool is_handled); | 64 void ProcessKeyEventByEngineDone(ui::KeyEvent* event, |
Shu Chen
2016/03/17 06:37:08
please add comment why this method is necessary.
Azure Wei
2016/03/17 07:02:37
Done.
| |
65 bool filtered, | |
66 bool composition_changed, | |
67 const ui::CompositionText& composition, | |
68 const base::string16& result_text, | |
69 bool is_handled); | |
62 | 70 |
63 scoped_ptr<LinuxInputMethodContext> context_; | 71 scoped_ptr<LinuxInputMethodContext> context_; |
64 scoped_ptr<LinuxInputMethodContext> context_simple_; | 72 scoped_ptr<LinuxInputMethodContext> context_simple_; |
65 | 73 |
66 base::string16 result_text_; | 74 base::string16 result_text_; |
67 | 75 |
68 ui::CompositionText composition_; | 76 ui::CompositionText composition_; |
69 | 77 |
70 // The current text input type used to indicates if |context_| and | 78 // The current text input type used to indicates if |context_| and |
71 // |context_simple_| are focused or not. | 79 // |context_simple_| are focused or not. |
(...skipping 12 matching lines...) Expand all Loading... | |
84 | 92 |
85 // Used for making callbacks. | 93 // Used for making callbacks. |
86 base::WeakPtrFactory<InputMethodAuraLinux> weak_ptr_factory_; | 94 base::WeakPtrFactory<InputMethodAuraLinux> weak_ptr_factory_; |
87 | 95 |
88 DISALLOW_COPY_AND_ASSIGN(InputMethodAuraLinux); | 96 DISALLOW_COPY_AND_ASSIGN(InputMethodAuraLinux); |
89 }; | 97 }; |
90 | 98 |
91 } // namespace ui | 99 } // namespace ui |
92 | 100 |
93 #endif // UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ | 101 #endif // UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
OLD | NEW |