DescriptionImplement chrome.input.ime.setComposition and chrome.input.ime.commitText APIs on Linux and Windows platform.
This cl makes ui::InputMethodBase inherits from ui::IMEInputContextHandlerInterface, thus we can implement functions CommitText() and UpdateCompositionText() once for Linux and Windows.
Make InputImeKeyEventHandledFunction::Run() calls the new added InputMethodBase::KeyEventHandler() in to set |handling_key_event_|, which indicates whether the IME extension is handling key event. And when |handling_key_event_| == true, we should not setComposition and commitText until it's done to run the callback.
Add helper function UpdateCommitText() and CommitTextToInputContext() in InputMethodEngineBase, which will be override in chromeos::InputMehtodEngine and input_method::InputMethodEngine to implement the API on different platforms.
BUG=517773
TEST=None
Committed: https://crrev.com/db5505268890037e5af265049ab64f79c01ef162
Cr-Commit-Position: refs/heads/master@{#376095}
Patch Set 1 #Patch Set 2 : Add commitText API. #Patch Set 3 : #
Total comments: 2
Patch Set 4 : Add KeyEventHandled() function in InputMethodEngineBase. #Patch Set 5 : Checkout InputImeEventRouter. #
Total comments: 6
Patch Set 6 : Addressed Devlin's comments. #
Total comments: 6
Patch Set 7 : Address Shu's comments. #Patch Set 8 : Sync up to date. #Patch Set 9 : Fix test error. #Patch Set 10 : Fix presubmit warning. #Patch Set 11 : #Patch Set 12 : Use string16 rather than wstring #Patch Set 13 : Fix test error. #Patch Set 14 : Use Xxx::Results::Create(). #Messages
Total messages: 53 (26 generated)
|