Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: chrome/common/extensions/api/language_settings_private.idl

Issue 2261903002: Fix race condition in MD Settings Languages page causing inconsistent settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update histograms Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 callback GetInputMethodListsCallback = void (InputMethodLists lists); 73 callback GetInputMethodListsCallback = void (InputMethodLists lists);
74 callback GetSpellcheckWordsCallback = void (DOMString[] words); 74 callback GetSpellcheckWordsCallback = void (DOMString[] words);
75 callback GetTranslateTargetLanguageCallback = void (DOMString languageCode); 75 callback GetTranslateTargetLanguageCallback = void (DOMString languageCode);
76 callback GetSpellcheckDictionaryStatusesCallback = 76 callback GetSpellcheckDictionaryStatusesCallback =
77 void (SpellcheckDictionaryStatus[] status); 77 void (SpellcheckDictionaryStatus[] status);
78 78
79 interface Functions { 79 interface Functions {
80 // Gets languages available for translate, spell checking, input and locale. 80 // Gets languages available for translate, spell checking, input and locale.
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 // Enables a language, adding it to the Accept-Language list (used to decide
84 // generate the Accept-Language header, etc. 84 // which languages to translate, generate the Accept-Language header, etc.).
85 static void setLanguageList(DOMString[] languageCodes); 85 static void enableLanguage(DOMString languageCode);
86
87 // Disables a language, removing it from the Accept-Language list.
88 static void disableLanguage(DOMString languageCode);
86 89
87 // Gets the current status of the chosen spell check dictionaries. 90 // Gets the current status of the chosen spell check dictionaries.
88 static void getSpellcheckDictionaryStatuses( 91 static void getSpellcheckDictionaryStatuses(
89 GetSpellcheckDictionaryStatusesCallback callback); 92 GetSpellcheckDictionaryStatusesCallback callback);
90 93
91 // Gets the custom spell check words, in sorted order. 94 // Gets the custom spell check words, in sorted order.
92 static void getSpellcheckWords(GetSpellcheckWordsCallback callback); 95 static void getSpellcheckWords(GetSpellcheckWordsCallback callback);
93 96
94 // Adds a word to the custom dictionary. 97 // Adds a word to the custom dictionary.
95 static void addSpellcheckWord(DOMString word); 98 static void addSpellcheckWord(DOMString word);
(...skipping 29 matching lines...) Expand all
125 static void onCustomDictionaryChanged( 128 static void onCustomDictionaryChanged(
126 DOMString[] wordsAdded, DOMString[] wordsRemoved); 129 DOMString[] wordsAdded, DOMString[] wordsRemoved);
127 130
128 // Called when an input method is added. 131 // Called when an input method is added.
129 static void onInputMethodAdded(DOMString inputMethodId); 132 static void onInputMethodAdded(DOMString inputMethodId);
130 133
131 // Called when an input method is removed. 134 // Called when an input method is removed.
132 static void onInputMethodRemoved(DOMString inputMethodId); 135 static void onInputMethodRemoved(DOMString inputMethodId);
133 }; 136 };
134 }; 137 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698