diff options
author | azurewei <azurewei@chromium.org> | 2015-12-08 20:46:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-09 04:46:50 +0000 |
commit | cadc388e0c72c69c7f3e63209bbb3f7ca56413f1 (patch) | |
tree | 51a6c6057e0db7c77703fe6d82c5337aeb08b01f /chrome/common/chrome_switches.cc | |
parent | 521b1ab80411f6412463c0fb6cce6ba5c4c1890a (diff) | |
download | chromium_src-cadc388e0c72c69c7f3e63209bbb3f7ca56413f1.zip chromium_src-cadc388e0c72c69c7f3e63209bbb3f7ca56413f1.tar.gz chromium_src-cadc388e0c72c69c7f3e63209bbb3f7ca56413f1.tar.bz2 |
Make ChromeOS IME APIs platform-independent, step 3: Compile chrome.input.ime.* APIs on windows and linux.
See the step 1 in: https://codereview.chromium.org/1403543004/
See the step 2 in: https://codereview.chromium.org/1419593002/
Main changes:
1. Update the entry in _permission_features.json and gypi file to make IME APIs accessible under chromeos, windows and linux platforms.
2. Add "platforms" attribute in input_ime.json, to reuse the ChromeOS APIs: chrome.input.ime.setComposition, .commitText, .sendKeyEvents, .keyEventHandled, .deleteSurroundingText, .onFocus, onBlur, .onKeyEvent, .onReset, .onDeactivated;
And keep other APIs ChromeOS only: chrome.input.ime.clearComposition, .hideInputView, .setCandidateWindowProperties, setCandidates, .setCursorPosition, .setMenumItems, updateMenuItems, .onActivate, .onInputContexUpdate, .onCandidateClicked, onMenuItemActivated, onSurroundingTextChanged.
3. Add flag "enable-input-ime-api" to enable chrome.input.ime API on Linux and Win.
Update input_ime_api.cc as API implementation on Linux and Win.
And add two kinds of errors: kErrorAPINotImplemented/ kErrorAPIDisabled to indicate whether this API is disabled.
4. Add new file input_ime_api_chromeos.cc for chromeos specific
implementation of the input_ime API.
BUG=517773
TEST=No compiling errors.
Review URL: https://codereview.chromium.org/1418643007
Cr-Commit-Position: refs/heads/master@{#363975}
Diffstat (limited to 'chrome/common/chrome_switches.cc')
-rw-r--r-- | chrome/common/chrome_switches.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 9443ec0..27a43c8 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1331,6 +1331,11 @@ const char kDisableAutoHidingToolbarThreshold[] = "disable-auto-hiding-toolbar-threshold"; #endif // defined(OS_ANDROID) +#if defined(OS_WIN) || defined(OS_LINUX) +extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; +extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; +#endif + bool AboutInSettingsEnabled() { return SettingsWindowEnabled() && !base::CommandLine::ForCurrentProcess()->HasSwitch( |