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 #ifndef CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTINGS_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTINGS_PRIVATE_API_H_
8 #include "base/macros.h"
9 #include "chrome/browser/extensions/chrome_extension_function_details.h"
10 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
11 #include "extensions/browser/extension_function.h"
13 namespace extensions
{
15 // Implements the languageSettingsPrivate.getLanguageList method.
16 class LanguageSettingsPrivateGetLanguageListFunction
17 : public UIThreadExtensionFunction
{
19 LanguageSettingsPrivateGetLanguageListFunction();
20 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getLanguageList",
21 LANGUAGESETTINGSPRIVATE_GETLANGUAGELIST
)
24 ~LanguageSettingsPrivateGetLanguageListFunction() override
;
26 // ExtensionFunction overrides.
27 ResponseAction
Run() override
;
30 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetLanguageListFunction
);
33 // Implements the languageSettingsPrivate.setLanguageList method.
34 class LanguageSettingsPrivateSetLanguageListFunction
35 : public UIThreadExtensionFunction
{
37 LanguageSettingsPrivateSetLanguageListFunction();
38 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.setLanguageList",
39 LANGUAGESETTINGSPRIVATE_SETLANGUAGELIST
)
42 ~LanguageSettingsPrivateSetLanguageListFunction() override
;
44 // ExtensionFunction overrides.
45 ResponseAction
Run() override
;
48 ChromeExtensionFunctionDetails chrome_details_
;
50 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateSetLanguageListFunction
);
53 // Implements the languageSettingsPrivate.getSpellcheckDictionaryStatuses
55 class LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction
56 : public UIThreadExtensionFunction
{
58 LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction();
59 DECLARE_EXTENSION_FUNCTION(
60 "languageSettingsPrivate.getSpellcheckDictionaryStatuses",
61 LANGUAGESETTINGSPRIVATE_GETSPELLCHECKDICTIONARYSTATUS
)
64 ~LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction() override
;
66 // ExtensionFunction overrides.
67 ResponseAction
Run() override
;
70 DISALLOW_COPY_AND_ASSIGN(
71 LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction
);
74 // Implements the languageSettingsPrivate.getSpellcheckWords method.
75 class LanguageSettingsPrivateGetSpellcheckWordsFunction
76 : public UIThreadExtensionFunction
{
78 LanguageSettingsPrivateGetSpellcheckWordsFunction();
79 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getSpellcheckWords",
80 LANGUAGESETTINGSPRIVATE_GETSPELLCHECKWORDS
)
83 ~LanguageSettingsPrivateGetSpellcheckWordsFunction() override
;
85 // ExtensionFunction overrides.
86 ResponseAction
Run() override
;
89 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetSpellcheckWordsFunction
);
92 // Implements the languageSettingsPrivate.getTranslateTargetLanguage method.
93 class LanguageSettingsPrivateGetTranslateTargetLanguageFunction
94 : public UIThreadExtensionFunction
{
96 LanguageSettingsPrivateGetTranslateTargetLanguageFunction();
97 DECLARE_EXTENSION_FUNCTION(
98 "languageSettingsPrivate.getTranslateTargetLanguage",
99 LANGUAGESETTINGSPRIVATE_GETTRANSLATETARGETLANGUAGE
)
102 ~LanguageSettingsPrivateGetTranslateTargetLanguageFunction() override
;
104 // ExtensionFunction overrides.
105 ResponseAction
Run() override
;
108 ChromeExtensionFunctionDetails chrome_details_
;
110 DISALLOW_COPY_AND_ASSIGN(
111 LanguageSettingsPrivateGetTranslateTargetLanguageFunction
);
114 // Implements the languageSettingsPrivate.getInputMethodLists method.
115 class LanguageSettingsPrivateGetInputMethodListsFunction
116 : public UIThreadExtensionFunction
{
118 LanguageSettingsPrivateGetInputMethodListsFunction();
119 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getInputMethodLists",
120 LANGUAGESETTINGSPRIVATE_GETINPUTMETHODLISTS
)
123 ~LanguageSettingsPrivateGetInputMethodListsFunction() override
;
125 // ExtensionFunction overrides.
126 ResponseAction
Run() override
;
129 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetInputMethodListsFunction
);
132 // Implements the languageSettingsPrivate.addInputMethod method.
133 class LanguageSettingsPrivateAddInputMethodFunction
134 : public UIThreadExtensionFunction
{
136 LanguageSettingsPrivateAddInputMethodFunction();
137 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.addInputMethod",
138 LANGUAGESETTINGSPRIVATE_ADDINPUTMETHOD
)
141 ~LanguageSettingsPrivateAddInputMethodFunction() override
;
143 // ExtensionFunction overrides.
144 ResponseAction
Run() override
;
147 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateAddInputMethodFunction
);
150 // Implements the languageSettingsPrivate.removeInputMethod method.
151 class LanguageSettingsPrivateRemoveInputMethodFunction
152 : public UIThreadExtensionFunction
{
154 LanguageSettingsPrivateRemoveInputMethodFunction();
155 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.removeInputMethod",
156 LANGUAGESETTINGSPRIVATE_REMOVEINPUTMETHOD
)
159 ~LanguageSettingsPrivateRemoveInputMethodFunction() override
;
161 // ExtensionFunction overrides.
162 ResponseAction
Run() override
;
165 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateRemoveInputMethodFunction
);
168 } // namespace extensions
170 #endif // CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTINGS_PRIVATE_API_H_