1 language_settings_private_externs
.js
3 // Copyright 2015 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file.
7 /** @fileoverview Externs generated from namespace: languageSettingsPrivate */
12 chrome
.languageSettingsPrivate
= {};
16 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-DownloadStatus
18 chrome
.languageSettingsPrivate
.DownloadStatus
= {
19 DOWNLOADED
: 'DOWNLOADED',
20 DOWNLOADING
: 'DOWNLOADING',
27 * displayName: string,
28 * nativeDisplayName: string,
29 * rtl: (boolean|undefined),
30 * supportsUI: (boolean|undefined),
31 * supportsSpellCheck: (boolean|undefined),
32 * supportsTranslate: (boolean|undefined)
34 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Language
40 * languageCode: string,
41 * status: !chrome.languageSettingsPrivate.DownloadStatus
43 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-SpellCheckDictionaryStatus
45 var SpellCheckDictionaryStatus
;
50 * displayName: string,
51 * languageCodes: !Array<string>,
54 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-InputMethod
60 * inputMethods: !Array<InputMethod>,
61 * componentExtensionIMEs: !Array<InputMethod>,
62 * thirdPartyExtensionIMEs: !Array<InputMethod>
64 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-InputMethodLists
69 * Gets languages available for translate, spell checking, input and locale.
70 * @param {function(!Array<Language>):void} callback
71 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getLanguageList
73 chrome
.languageSettingsPrivate
.getLanguageList = function(callback
) {};
76 * Sets the accepted languages, used to decide which languages to translate,
77 * generate the Accept-Language header, etc.
78 * @param {!Array<string>} languageCodes
79 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-setLanguageList
81 chrome
.languageSettingsPrivate
.setLanguageList = function(languageCodes
) {};
84 * Gets the current status of the spell check dictionary.
85 * @param {function(SpellCheckDictionaryStatus):void} callback
86 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getSpellCheckDictionaryStatus
88 chrome
.languageSettingsPrivate
.getSpellCheckDictionaryStatus = function(callback
) {};
91 * Gets the custom spell check words.
92 * @param {function(!Array<string>):void} callback
93 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getSpellCheckWords
95 chrome
.languageSettingsPrivate
.getSpellCheckWords = function(callback
) {};
98 * Gets the translate target language (in most cases, the display locale).
99 * @param {function(string):void} callback
100 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getTranslateTargetLanguage
102 chrome
.languageSettingsPrivate
.getTranslateTargetLanguage = function(callback
) {};
105 * Gets all supported input methods, including IMEs. Chrome OS only.
106 * @param {function(InputMethodLists):void} callback
107 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getInputMethodLists
109 chrome
.languageSettingsPrivate
.getInputMethodLists = function(callback
) {};
112 * Adds the input method to the current user's list of enabled input methods,
113 * enabling the input method for the current user. Chrome OS only.
114 * @param {string} inputMethodId
115 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-addInputMethod
117 chrome
.languageSettingsPrivate
.addInputMethod = function(inputMethodId
) {};
120 * 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.
122 * @param {string} inputMethodId
123 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-removeInputMethod
125 chrome
.languageSettingsPrivate
.removeInputMethod = function(inputMethodId
) {};
128 * Called when the language used for spell checking changes or the dictionary
129 * download status changes.
130 * @type {!ChromeEvent}
131 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onSpellCheckDictionaryChanged
133 chrome
.languageSettingsPrivate
.onSpellCheckDictionaryChanged
;
136 * Called when an input method is added.
137 * @type {!ChromeEvent}
138 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onInputMethodAdded
140 chrome
.languageSettingsPrivate
.onInputMethodAdded
;
143 * Called when an input method is removed.
144 * @type {!ChromeEvent}
145 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onInputMethodRemoved
147 chrome
.languageSettingsPrivate
.onInputMethodRemoved
;