Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: ui/base/ime/input_method_chromeos.h

Issue 298893003: Supports fake key events for setComposition/commitText by on-screen keyboards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 with VKEY_PROCESSKEY key code and dispatches it to
92 // the focused View.
93 void SendFakeProcessKeyEvent(bool pressed) const;
94
91 // Abandons all pending key events. It usually happends when we lose keyboard 95 // Abandons all pending key events. It usually happends when we lose keyboard
92 // focus, the text input type is changed or we are destroyed. 96 // focus, the text input type is changed or we are destroyed.
93 void AbandonAllPendingKeyEvents(); 97 void AbandonAllPendingKeyEvents();
94 98
95 // Passes keyevent and executes character composition if necessary. Returns 99 // Passes keyevent and executes character composition if necessary. Returns
96 // true if character composer comsumes key event. 100 // true if character composer comsumes key event.
97 bool ExecuteCharacterComposer(const ui::KeyEvent& event); 101 bool ExecuteCharacterComposer(const ui::KeyEvent& event);
98 102
99 // chromeos::IMEInputContextHandlerInterface overrides: 103 // chromeos::IMEInputContextHandlerInterface overrides:
100 virtual void CommitText(const std::string& text) OVERRIDE; 104 virtual void CommitText(const std::string& text) OVERRIDE;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 150
147 // Used for making callbacks. 151 // Used for making callbacks.
148 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; 152 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_;
149 153
150 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); 154 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS);
151 }; 155 };
152 156
153 } // namespace ui 157 } // namespace ui
154 158
155 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ 159 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos.cc » ('j') | ui/base/ime/input_method_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698