Commit 6fbad99e authored by Jing Wang's avatar Jing Wang Committed by Commit Bot

Add private api for input method options changed event.

onInputMethodOptionsChanged event will be fired by input method engine
when any change to the input method settings in pref has been observed.

Changes in third_party/ are auto-generated according to instructions at
https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
These two files were not update to date before, so there are some changes
which are irrelevant to input method options changed event.

Bug: 1042084
Change-Id: Iff7ccf76b11d5c196ac3aa2c012b2ef92720bde6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264089
Commit-Queue: Jing Wang <jiwan@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786609}
parent c8ab66b3
......@@ -777,6 +777,17 @@
}
}
]
}, {
"name": "onInputMethodOptionsChanged",
"type": "function",
"description": "This event is sent when input method options are changed.",
"parameters": [
{
"name": "engineID",
"type": "string",
"description": "The engine ID for the input method being changed."
}
]
}
]
}
......
......@@ -328,7 +328,7 @@ chrome.inputMethodPrivate.setSettings = function(engineID, settings, callback) {
* }} parameters
* @param {function(boolean): void=} callback Called when the operation
* completes with a boolean indicating if the text was accepted or not. On
* failure, chrome.runtime.lastError is set.
* failure, $(ref:runtime.lastError) is set.
*/
chrome.inputMethodPrivate.setCompositionRange = function(parameters, callback) {};
......@@ -341,8 +341,8 @@ chrome.inputMethodPrivate.setCompositionRange = function(parameters, callback) {
* selectionStart: number,
* selectionEnd: number
* }} parameters
* @param {function(boolean): void=} callback Called when the operation
* completes. On failure, chrome.runtime.lastError is set.
* @param {function(): void=} callback Called when the operation completes. On
* failure, chrome.runtime.lastError is set.
*/
chrome.inputMethodPrivate.setAutocorrectRange = function(parameters, callback) {};
......@@ -421,3 +421,9 @@ chrome.inputMethodPrivate.onScreenProjectionChanged;
* @type {!ChromeEvent}
*/
chrome.inputMethodPrivate.onSuggestionsChanged;
/**
* This event is sent when input method options are changed.
* @type {!ChromeEvent}
*/
chrome.inputMethodPrivate.onInputMethodOptionsChanged;
......@@ -16,7 +16,7 @@ InputMethodPrivate.prototype = {
* @param {function({
* isPhysicalKeyboardAutocorrectEnabled: boolean,
* isImeMenuActivated: boolean
* }):void} callback Callback which is called with the config object.
* }): void} callback Callback which is called with the config object.
*/
getInputMethodConfig: function(callback) {},
......@@ -26,13 +26,13 @@ InputMethodPrivate.prototype = {
* id: string,
* name: string,
* indicator: string
* }>):void} callback Callback which is called with the input method objects.
* }>): void} callback Callback which is called with the input method objects.
*/
getInputMethods: function(callback) {},
/**
* Gets the current input method.
* @param {function(string):void} callback Callback which is called with the
* @param {function(string): void} callback Callback which is called with the
* current input method.
*/
getCurrentInputMethod: function(callback) {},
......@@ -41,7 +41,7 @@ InputMethodPrivate.prototype = {
* Sets the current input method.
* @param {string} inputMethodId The input method ID to be set as current
* input method.
* @param {function():void=} callback Callback which is called once the
* @param {function(): void=} callback Callback which is called once the
* current input method is set. If unsuccessful $(ref:runtime.lastError)
* is set.
*/
......@@ -49,7 +49,7 @@ InputMethodPrivate.prototype = {
/**
* Fetches a list of all the words currently in the dictionary.
* @param {function(!Array<string>):void} callback Callback which is called
* @param {function(!Array<string>): void} callback Callback which is called
* once the list of dictionary words are ready.
*/
fetchAllDictionaryWords: function(callback) {},
......@@ -57,14 +57,14 @@ InputMethodPrivate.prototype = {
/**
* Adds a single word to be stored in the dictionary.
* @param {string} word A new word to add to the dictionary.
* @param {function():void=} callback Callback which is called once the word
* @param {function(): void=} callback Callback which is called once the word
* is added. If unsuccessful $(ref:runtime.lastError) is set.
*/
addWordToDictionary: function(word, callback) {},
/**
* Gets whether the encrypt sync is enabled.
* @param {function(boolean):void=} callback Callback which is called to
* @param {function(boolean): void=} callback Callback which is called to
* provide the result.
*/
getEncryptSyncEnabled: function(callback) {},
......@@ -72,8 +72,8 @@ InputMethodPrivate.prototype = {
/**
* Sets the XKB layout for the given input method.
* @param {string} xkb_name The XKB layout name.
* @param {function():void=} callback Callback which is called when the layout
* is set.
* @param {function(): void=} callback Callback which is called when the
* layout is set.
*/
setXkbLayout: function(xkb_name, callback) {},
......@@ -83,7 +83,7 @@ InputMethodPrivate.prototype = {
* @param {{
* contextID: number
* }} parameters
* @param {function():void=} callback Called when the operation completes.
* @param {function(): void=} callback Called when the operation completes.
*/
finishComposingText: function(parameters, callback) {},
......@@ -94,7 +94,7 @@ InputMethodPrivate.prototype = {
* selectionStart: (number|undefined),
* selectionEnd: (number|undefined)
* }} parameters
* @param {function(boolean):void=} callback Called when the operation
* @param {function(boolean): void=} callback Called when the operation
* completes with a boolean indicating if the text was accepted or not.
*/
setSelectionRange: function(parameters, callback) {},
......@@ -109,10 +109,17 @@ InputMethodPrivate.prototype = {
/**
* Shows the input view window. If the input view window is already shown,
* this function will do nothing.
* @param {function():void=} callback Called when the operation completes.
* @param {function(): void=} callback Called when the operation completes.
*/
showInputView: function(callback) {},
/**
* Hides the input view window. If the input view window is already hidden,
* this function will do nothing.
* @param {function(): void=} callback Called when the operation completes.
*/
hideInputView: function(callback) {},
/**
* Opens the options page for the input method extension. If the input method
* does not have options, this function will do nothing.
......@@ -127,7 +134,7 @@ InputMethodPrivate.prototype = {
* y: number,
* w: number,
* h: number
* }>):void} callback Callback which is called to provide the result
* }>): void} callback Callback which is called to provide the result
*/
getCompositionBounds: function(callback) {},
......@@ -141,30 +148,29 @@ InputMethodPrivate.prototype = {
* before: string,
* selected: string,
* after: string
* }):void} callback Callback which is called to provide the result
* }): void} callback Callback which is called to provide the result
*/
getSurroundingText: function(beforeLength, afterLength, callback) {},
/**
* Gets the current value of a setting for a particular input method
* Gets the current values of all settings for a particular input method
* @param {string} engineID The ID of the engine (e.g. 'zh-t-i0-pinyin',
* 'xkb:us::eng')
* @param {string} key The setting to get
* @param {function((*|undefined)):void} callback Callback to receive the
* setting
* @param {function((!chrome.inputMethodPrivate.InputMethodSettings|undefined)): void}
* callback Callback to receive the settings
*/
getSetting: function(engineID, key, callback) {},
getSettings: function(engineID, callback) {},
/**
* Sets the value of a setting for a particular input method
* Sets the value of all settings for a particular input method
* @param {string} engineID The ID of the engine (e.g. 'zh-t-i0-pinyin',
* 'xkb:us::eng')
* @param {string} key The setting to set
* @param {*} value The new value of the setting
* @param {function():void=} callback Callback to notify that the new value
* @param {!chrome.inputMethodPrivate.InputMethodSettings} settings The
* settings to set
* @param {function(): void=} callback Callback to notify that the new value
* has been set
*/
setSetting: function(engineID, key, value, callback) {},
setSettings: function(engineID, settings, callback) {},
/**
* Set the composition range. If this extension does not own the active IME,
......@@ -179,12 +185,26 @@ InputMethodPrivate.prototype = {
* style: !chrome.inputMethodPrivate.UnderlineStyle
* }>|undefined)
* }} parameters
* @param {function(boolean):void=} callback Called when the operation
* @param {function(boolean): void=} callback Called when the operation
* completes with a boolean indicating if the text was accepted or not. On
* failure, chrome.runtime.lastError is set.
* failure, $(ref:runtime.lastError) is set.
*/
setCompositionRange: function(parameters, callback) {},
/**
* Set the autocorrect range and autocorrect word. If this extension does not
* own the active IME, this fails.
* @param {{
* contextID: number,
* autocorrectString: string,
* selectionStart: number,
* selectionEnd: number
* }} parameters
* @param {function(): void=} callback Called when the operation completes. On
* failure, chrome.runtime.lastError is set.
*/
setAutocorrectRange: function(parameters, callback) {},
/**
* Resets the current engine to its initial state. Fires an OnReset event.
*/
......@@ -255,3 +275,15 @@ InputMethodPrivate.prototype.onSettingsChanged;
* @type {!ChromeEvent}
*/
InputMethodPrivate.prototype.onScreenProjectionChanged;
/**
* This event is sent when a new set of suggestions has been generated
* @type {!ChromeEvent}
*/
InputMethodPrivate.prototype.onSuggestionsChanged;
/**
* This event is sent when input method options are changed.
* @type {!ChromeEvent}
*/
InputMethodPrivate.prototype.onInputMethodOptionsChanged;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment