1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /** @fileoverview Externs generated from namespace: languageSettingsPrivate */
10 chrome.languageSettingsPrivate = {};
15 * displayName: string,
16 * nativeDisplayName: string,
17 * displayNameRTL: (boolean|undefined),
18 * supportsUI: (boolean|undefined),
19 * supportsSpellcheck: (boolean|undefined),
20 * supportsTranslate: (boolean|undefined)
22 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-Language
28 * languageCode: string,
30 * isDownloading: (boolean|undefined),
31 * downloadFailed: (boolean|undefined)
33 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-SpellcheckDictionaryStatus
35 var SpellcheckDictionaryStatus;
40 * displayName: string,
41 * languageCodes: !Array<string>,
44 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-InputMethod
50 * inputMethods: !Array<InputMethod>,
51 * componentExtensionIMEs: !Array<InputMethod>,
52 * thirdPartyExtensionIMEs: !Array<InputMethod>
54 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#type-InputMethodLists
59 * Gets languages available for translate, spell checking, input and locale.
60 * @param {function(!Array<Language>):void} callback
61 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getLanguageList
63 chrome.languageSettingsPrivate.getLanguageList = function(callback) {};
66 * Sets the accepted languages, used to decide which languages to translate,
67 * generate the Accept-Language header, etc.
68 * @param {!Array<string>} languageCodes
69 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-setLanguageList
71 chrome.languageSettingsPrivate.setLanguageList = function(languageCodes) {};
74 * Gets the current status of the chosen spell check dictionaries.
75 * @param {function(!Array<SpellcheckDictionaryStatus>):void} callback
76 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getSpellcheckDictionaryStatuses
78 chrome.languageSettingsPrivate.getSpellcheckDictionaryStatuses = function(callback) {};
81 * Gets the custom spell check words.
82 * @param {function(!Array<string>):void} callback
83 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getSpellcheckWords
85 chrome.languageSettingsPrivate.getSpellcheckWords = function(callback) {};
88 * Gets the translate target language (in most cases, the display locale).
89 * @param {function(string):void} callback
90 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getTranslateTargetLanguage
92 chrome.languageSettingsPrivate.getTranslateTargetLanguage = function(callback) {};
95 * Gets all supported input methods, including IMEs. Chrome OS only.
96 * @param {function(InputMethodLists):void} callback
97 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-getInputMethodLists
99 chrome.languageSettingsPrivate.getInputMethodLists = function(callback) {};
102 * Adds the input method to the current user's list of enabled input methods,
103 * enabling the input method for the current user. Chrome OS only.
104 * @param {string} inputMethodId
105 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-addInputMethod
107 chrome.languageSettingsPrivate.addInputMethod = function(inputMethodId) {};
110 * Removes the input method from the current user's list of enabled input
111 * methods, disabling the input method for the current user. Chrome OS only.
112 * @param {string} inputMethodId
113 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#method-removeInputMethod
115 chrome.languageSettingsPrivate.removeInputMethod = function(inputMethodId) {};
118 * Called when the pref for the dictionaries used for spell checking changes or
119 * the status of one of the spell check dictionaries changes.
120 * @type {!ChromeEvent}
121 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onSpellcheckDictionariesChanged
123 chrome.languageSettingsPrivate.onSpellcheckDictionariesChanged;
126 * Called when words are added to and/or removed from the custom spell check
128 * @type {!ChromeEvent}
129 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onCustomDictionaryChanged
131 chrome.languageSettingsPrivate.onCustomDictionaryChanged;
134 * Called when an input method is added.
135 * @type {!ChromeEvent}
136 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onInputMethodAdded
138 chrome.languageSettingsPrivate.onInputMethodAdded;
141 * Called when an input method is removed.
142 * @type {!ChromeEvent}
143 * @see https://developer.chrome.com/extensions/languageSettingsPrivate#event-onInputMethodRemoved
145 chrome.languageSettingsPrivate.onInputMethodRemoved;