| OLD | NEW |
| 1 language_settings_private_externs.js | |
| 2 | |
| 3 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 // 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 |
| 5 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 6 | 4 |
| 7 /** @fileoverview Externs generated from namespace: languageSettingsPrivate */ | 5 /** @fileoverview Externs generated from namespace: languageSettingsPrivate */ |
| 8 | 6 |
| 9 /** | 7 /** |
| 10 * @const | 8 * @const |
| 11 */ | 9 */ |
| 12 chrome.languageSettingsPrivate = {}; | 10 chrome.languageSettingsPrivate = {}; |
| 13 | 11 |
| 14 /** | 12 /** |
| 15 * @enum {string} | |
| 16 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Dow
nloadStatus | |
| 17 */ | |
| 18 chrome.languageSettingsPrivate.DownloadStatus = { | |
| 19 DOWNLOADED: 'DOWNLOADED', | |
| 20 DOWNLOADING: 'DOWNLOADING', | |
| 21 FAILURE: 'FAILURE', | |
| 22 }; | |
| 23 | |
| 24 /** | |
| 25 * @typedef {{ | 13 * @typedef {{ |
| 26 * code: string, | 14 * code: string, |
| 27 * displayName: string, | 15 * displayName: string, |
| 28 * nativeDisplayName: string, | 16 * nativeDisplayName: string, |
| 29 * rtl: (boolean|undefined), | 17 * rtl: (boolean|undefined), |
| 30 * supportsUI: (boolean|undefined), | 18 * supportsUi: (boolean|undefined), |
| 31 * supportsSpellCheck: (boolean|undefined), | 19 * supportsSpellcheck: (boolean|undefined), |
| 32 * supportsTranslate: (boolean|undefined) | 20 * supportsTranslate: (boolean|undefined) |
| 33 * }} | 21 * }} |
| 34 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Lan
guage | 22 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Lan
guage |
| 35 */ | 23 */ |
| 36 var Language; | 24 var Language; |
| 37 | 25 |
| 38 /** | 26 /** |
| 39 * @typedef {{ | 27 * @typedef {{ |
| 40 * languageCode: string, | 28 * languageCode: string, |
| 41 * status: !chrome.languageSettingsPrivate.DownloadStatus | 29 * isReady: boolean, |
| 30 * isDownloading: (boolean|undefined), |
| 31 * downloadFailed: (boolean|undefined) |
| 42 * }} | 32 * }} |
| 43 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Spe
llCheckDictionaryStatus | 33 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Spe
llcheckDictionaryStatus |
| 44 */ | 34 */ |
| 45 var SpellCheckDictionaryStatus; | 35 var SpellcheckDictionaryStatus; |
| 46 | 36 |
| 47 /** | 37 /** |
| 48 * @typedef {{ | 38 * @typedef {{ |
| 49 * id: string, | 39 * id: string, |
| 50 * displayName: string, | 40 * displayName: string, |
| 51 * languageCodes: !Array<string>, | 41 * languageCodes: !Array<string>, |
| 52 * enabled: boolean | 42 * enabled: boolean |
| 53 * }} | 43 * }} |
| 54 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Inp
utMethod | 44 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Inp
utMethod |
| 55 */ | 45 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 74 | 64 |
| 75 /** | 65 /** |
| 76 * Sets the accepted languages, used to decide which languages to translate, | 66 * Sets the accepted languages, used to decide which languages to translate, |
| 77 * generate the Accept-Language header, etc. | 67 * generate the Accept-Language header, etc. |
| 78 * @param {!Array<string>} languageCodes | 68 * @param {!Array<string>} languageCodes |
| 79 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-s
etLanguageList | 69 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-s
etLanguageList |
| 80 */ | 70 */ |
| 81 chrome.languageSettingsPrivate.setLanguageList = function(languageCodes) {}; | 71 chrome.languageSettingsPrivate.setLanguageList = function(languageCodes) {}; |
| 82 | 72 |
| 83 /** | 73 /** |
| 84 * Gets the current status of the spell check dictionary. | 74 * Gets the current status of the chosen spell check dictionaries. |
| 85 * @param {function(SpellCheckDictionaryStatus):void} callback | 75 * @param {function(!Array<SpellcheckDictionaryStatus>):void} callback |
| 86 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etSpellCheckDictionaryStatus | 76 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etSpellcheckDictionaryStatuses |
| 87 */ | 77 */ |
| 88 chrome.languageSettingsPrivate.getSpellCheckDictionaryStatus = function(callback
) {}; | 78 chrome.languageSettingsPrivate.getSpellcheckDictionaryStatuses = function(callba
ck) {}; |
| 89 | 79 |
| 90 /** | 80 /** |
| 91 * Gets the custom spell check words. | 81 * Gets the custom spell check words. |
| 92 * @param {function(!Array<string>):void} callback | 82 * @param {function(!Array<string>):void} callback |
| 93 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etSpellCheckWords | 83 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etSpellcheckWords |
| 94 */ | 84 */ |
| 95 chrome.languageSettingsPrivate.getSpellCheckWords = function(callback) {}; | 85 chrome.languageSettingsPrivate.getSpellcheckWords = function(callback) {}; |
| 96 | 86 |
| 97 /** | 87 /** |
| 98 * Gets the translate target language (in most cases, the display locale). | 88 * Gets the translate target language (in most cases, the display locale). |
| 99 * @param {function(string):void} callback | 89 * @param {function(string):void} callback |
| 100 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etTranslateTargetLanguage | 90 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-g
etTranslateTargetLanguage |
| 101 */ | 91 */ |
| 102 chrome.languageSettingsPrivate.getTranslateTargetLanguage = function(callback) {
}; | 92 chrome.languageSettingsPrivate.getTranslateTargetLanguage = function(callback) {
}; |
| 103 | 93 |
| 104 /** | 94 /** |
| 105 * Gets all supported input methods, including IMEs. Chrome OS only. | 95 * Gets all supported input methods, including IMEs. Chrome OS only. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 118 | 108 |
| 119 /** | 109 /** |
| 120 * Removes the input method from the current user's list of enabled input | 110 * Removes the input method from the current user's list of enabled input |
| 121 * methods, disabling the input method for the current user. Chrome OS only. | 111 * methods, disabling the input method for the current user. Chrome OS only. |
| 122 * @param {string} inputMethodId | 112 * @param {string} inputMethodId |
| 123 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-r
emoveInputMethod | 113 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-r
emoveInputMethod |
| 124 */ | 114 */ |
| 125 chrome.languageSettingsPrivate.removeInputMethod = function(inputMethodId) {}; | 115 chrome.languageSettingsPrivate.removeInputMethod = function(inputMethodId) {}; |
| 126 | 116 |
| 127 /** | 117 /** |
| 128 * Called when the language used for spell checking changes or the dictionary | 118 * Called when the pref for the dictionaries used for spell checking changes or |
| 129 * download status changes. | 119 * the status of one of the spell check dictionaries changes. |
| 130 * @type {!ChromeEvent} | 120 * @type {!ChromeEvent} |
| 131 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
SpellCheckDictionaryChanged | 121 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
SpellcheckDictionariesChanged |
| 132 */ | 122 */ |
| 133 chrome.languageSettingsPrivate.onSpellCheckDictionaryChanged; | 123 chrome.languageSettingsPrivate.onSpellcheckDictionariesChanged; |
| 124 |
| 125 /** |
| 126 * Called when words are added to and/or removed from the custom spell check |
| 127 * dictionary. |
| 128 * @type {!ChromeEvent} |
| 129 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
CustomDictionaryChanged |
| 130 */ |
| 131 chrome.languageSettingsPrivate.onCustomDictionaryChanged; |
| 134 | 132 |
| 135 /** | 133 /** |
| 136 * Called when an input method is added. | 134 * Called when an input method is added. |
| 137 * @type {!ChromeEvent} | 135 * @type {!ChromeEvent} |
| 138 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
InputMethodAdded | 136 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
InputMethodAdded |
| 139 */ | 137 */ |
| 140 chrome.languageSettingsPrivate.onInputMethodAdded; | 138 chrome.languageSettingsPrivate.onInputMethodAdded; |
| 141 | 139 |
| 142 /** | 140 /** |
| 143 * Called when an input method is removed. | 141 * Called when an input method is removed. |
| 144 * @type {!ChromeEvent} | 142 * @type {!ChromeEvent} |
| 145 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
InputMethodRemoved | 143 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-on
InputMethodRemoved |
| 146 */ | 144 */ |
| 147 chrome.languageSettingsPrivate.onInputMethodRemoved; | 145 chrome.languageSettingsPrivate.onInputMethodRemoved; |
| 148 | 146 |
| 149 | 147 |
| OLD | NEW |