Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / extensions / api / language_settings_private / language_settings_private_api.h
blob7d22108ce24a7dfa2cf2f554c6baf52d10d58366
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 {
18 public:
19 LanguageSettingsPrivateGetLanguageListFunction();
20 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getLanguageList",
21 LANGUAGESETTINGSPRIVATE_GETLANGUAGELIST)
23 protected:
24 ~LanguageSettingsPrivateGetLanguageListFunction() override;
26 // ExtensionFunction overrides.
27 ResponseAction Run() override;
29 private:
30 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetLanguageListFunction);
33 // Implements the languageSettingsPrivate.setLanguageList method.
34 class LanguageSettingsPrivateSetLanguageListFunction
35 : public UIThreadExtensionFunction {
36 public:
37 LanguageSettingsPrivateSetLanguageListFunction();
38 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.setLanguageList",
39 LANGUAGESETTINGSPRIVATE_SETLANGUAGELIST)
41 protected:
42 ~LanguageSettingsPrivateSetLanguageListFunction() override;
44 // ExtensionFunction overrides.
45 ResponseAction Run() override;
47 private:
48 ChromeExtensionFunctionDetails chrome_details_;
50 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateSetLanguageListFunction);
53 // Implements the languageSettingsPrivate.getSpellcheckDictionaryStatuses
54 // method.
55 class LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction
56 : public UIThreadExtensionFunction {
57 public:
58 LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction();
59 DECLARE_EXTENSION_FUNCTION(
60 "languageSettingsPrivate.getSpellcheckDictionaryStatuses",
61 LANGUAGESETTINGSPRIVATE_GETSPELLCHECKDICTIONARYSTATUS)
63 protected:
64 ~LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction() override;
66 // ExtensionFunction overrides.
67 ResponseAction Run() override;
69 private:
70 DISALLOW_COPY_AND_ASSIGN(
71 LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction);
74 // Implements the languageSettingsPrivate.getSpellcheckWords method.
75 class LanguageSettingsPrivateGetSpellcheckWordsFunction
76 : public UIThreadExtensionFunction {
77 public:
78 LanguageSettingsPrivateGetSpellcheckWordsFunction();
79 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getSpellcheckWords",
80 LANGUAGESETTINGSPRIVATE_GETSPELLCHECKWORDS)
82 protected:
83 ~LanguageSettingsPrivateGetSpellcheckWordsFunction() override;
85 // ExtensionFunction overrides.
86 ResponseAction Run() override;
88 private:
89 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetSpellcheckWordsFunction);
92 // Implements the languageSettingsPrivate.getTranslateTargetLanguage method.
93 class LanguageSettingsPrivateGetTranslateTargetLanguageFunction
94 : public UIThreadExtensionFunction {
95 public:
96 LanguageSettingsPrivateGetTranslateTargetLanguageFunction();
97 DECLARE_EXTENSION_FUNCTION(
98 "languageSettingsPrivate.getTranslateTargetLanguage",
99 LANGUAGESETTINGSPRIVATE_GETTRANSLATETARGETLANGUAGE)
101 protected:
102 ~LanguageSettingsPrivateGetTranslateTargetLanguageFunction() override;
104 // ExtensionFunction overrides.
105 ResponseAction Run() override;
107 private:
108 ChromeExtensionFunctionDetails chrome_details_;
110 DISALLOW_COPY_AND_ASSIGN(
111 LanguageSettingsPrivateGetTranslateTargetLanguageFunction);
114 // Implements the languageSettingsPrivate.getInputMethodLists method.
115 class LanguageSettingsPrivateGetInputMethodListsFunction
116 : public UIThreadExtensionFunction {
117 public:
118 LanguageSettingsPrivateGetInputMethodListsFunction();
119 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getInputMethodLists",
120 LANGUAGESETTINGSPRIVATE_GETINPUTMETHODLISTS)
122 protected:
123 ~LanguageSettingsPrivateGetInputMethodListsFunction() override;
125 // ExtensionFunction overrides.
126 ResponseAction Run() override;
128 private:
129 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateGetInputMethodListsFunction);
132 // Implements the languageSettingsPrivate.addInputMethod method.
133 class LanguageSettingsPrivateAddInputMethodFunction
134 : public UIThreadExtensionFunction {
135 public:
136 LanguageSettingsPrivateAddInputMethodFunction();
137 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.addInputMethod",
138 LANGUAGESETTINGSPRIVATE_ADDINPUTMETHOD)
140 protected:
141 ~LanguageSettingsPrivateAddInputMethodFunction() override;
143 // ExtensionFunction overrides.
144 ResponseAction Run() override;
146 private:
147 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateAddInputMethodFunction);
150 // Implements the languageSettingsPrivate.removeInputMethod method.
151 class LanguageSettingsPrivateRemoveInputMethodFunction
152 : public UIThreadExtensionFunction {
153 public:
154 LanguageSettingsPrivateRemoveInputMethodFunction();
155 DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.removeInputMethod",
156 LANGUAGESETTINGSPRIVATE_REMOVEINPUTMETHOD)
158 protected:
159 ~LanguageSettingsPrivateRemoveInputMethodFunction() override;
161 // ExtensionFunction overrides.
162 ResponseAction Run() override;
164 private:
165 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateRemoveInputMethodFunction);
168 } // namespace extensions
170 #endif // CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTINGS_PRIVATE_API_H_