Implement chrome.input.ime.setComposition and chrome.input.ime.commitText APIs...
Implement 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 Review URL: https://codereview.chromium.org/1657593007 Cr-Commit-Position: refs/heads/master@{#376095}
Showing
Please register or sign in to comment