OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use the <code>chrome.languageSettingsPrivate</code> API to get or change | 5 // Use the <code>chrome.languageSettingsPrivate</code> API to get or change |
6 // language and input method settings. | 6 // language and input method settings. |
7 namespace languageSettingsPrivate { | 7 namespace languageSettingsPrivate { |
8 dictionary Language { | 8 dictionary Language { |
9 // The unique code identifying the language. | 9 // The unique code identifying the language. |
10 DOMString code; | 10 DOMString code; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 static void getLanguageList(GetLanguageListCallback callback); | 81 static void getLanguageList(GetLanguageListCallback callback); |
82 | 82 |
83 // Sets the accepted languages, used to decide which languages to translate, | 83 // Sets the accepted languages, used to decide which languages to translate, |
84 // generate the Accept-Language header, etc. | 84 // generate the Accept-Language header, etc. |
85 static void setLanguageList(DOMString[] languageCodes); | 85 static void setLanguageList(DOMString[] languageCodes); |
86 | 86 |
87 // Gets the current status of the chosen spell check dictionaries. | 87 // Gets the current status of the chosen spell check dictionaries. |
88 static void getSpellcheckDictionaryStatuses( | 88 static void getSpellcheckDictionaryStatuses( |
89 GetSpellcheckDictionaryStatusesCallback callback); | 89 GetSpellcheckDictionaryStatusesCallback callback); |
90 | 90 |
91 // Gets the custom spell check words. | 91 // Gets the custom spell check words, in sorted order. |
92 static void getSpellcheckWords(GetSpellcheckWordsCallback callback); | 92 static void getSpellcheckWords(GetSpellcheckWordsCallback callback); |
93 | 93 |
| 94 // Adds a word to the custom dictionary. |
| 95 static void addSpellcheckWord(DOMString word); |
| 96 |
| 97 // Removes a word from the custom dictionary. |
| 98 static void removeSpellcheckWord(DOMString word); |
| 99 |
94 // Gets the translate target language (in most cases, the display locale). | 100 // Gets the translate target language (in most cases, the display locale). |
95 static void getTranslateTargetLanguage( | 101 static void getTranslateTargetLanguage( |
96 GetTranslateTargetLanguageCallback callback); | 102 GetTranslateTargetLanguageCallback callback); |
97 | 103 |
98 // Gets all supported input methods, including IMEs. Chrome OS only. | 104 // Gets all supported input methods, including IMEs. Chrome OS only. |
99 static void getInputMethodLists(GetInputMethodListsCallback callback); | 105 static void getInputMethodLists(GetInputMethodListsCallback callback); |
100 | 106 |
101 // Adds the input method to the current user's list of enabled input | 107 // Adds the input method to the current user's list of enabled input |
102 // methods, enabling the input method for the current user. Chrome OS only. | 108 // methods, enabling the input method for the current user. Chrome OS only. |
103 static void addInputMethod(DOMString inputMethodId); | 109 static void addInputMethod(DOMString inputMethodId); |
(...skipping 14 matching lines...) Expand all Loading... |
118 static void onCustomDictionaryChanged( | 124 static void onCustomDictionaryChanged( |
119 DOMString[] wordsAdded, DOMString[] wordsRemoved); | 125 DOMString[] wordsAdded, DOMString[] wordsRemoved); |
120 | 126 |
121 // Called when an input method is added. | 127 // Called when an input method is added. |
122 static void onInputMethodAdded(DOMString inputMethodId); | 128 static void onInputMethodAdded(DOMString inputMethodId); |
123 | 129 |
124 // Called when an input method is removed. | 130 // Called when an input method is removed. |
125 static void onInputMethodRemoved(DOMString inputMethodId); | 131 static void onInputMethodRemoved(DOMString inputMethodId); |
126 }; | 132 }; |
127 }; | 133 }; |
OLD | NEW |