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

Side by Side Diff: chrome/browser/chromeos/extensions/input_method_api.h

Issue 1897913002: Input method functions for chrome.languageSettingsPrivate and chrome.inputMethodPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ~InputMethodPrivateShowInputViewFunction() override {} 168 ~InputMethodPrivateShowInputViewFunction() override {}
169 169
170 ResponseAction Run() override; 170 ResponseAction Run() override;
171 171
172 private: 172 private:
173 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.showInputView", 173 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.showInputView",
174 INPUTMETHODPRIVATE_SHOWINPUTVIEW) 174 INPUTMETHODPRIVATE_SHOWINPUTVIEW)
175 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateShowInputViewFunction); 175 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateShowInputViewFunction);
176 }; 176 };
177 177
178 // Implements the inputMethodPrivate.openOptionsPage method.
179 class InputMethodPrivateOpenOptionsPageFunction
180 : public UIThreadExtensionFunction {
181 public:
182 InputMethodPrivateOpenOptionsPageFunction() {}
183
184 protected:
185 ~InputMethodPrivateOpenOptionsPageFunction() override {}
186
187 ResponseAction Run() override;
188
189 private:
190 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.openOptionsPage",
191 INPUTMETHODPRIVATE_OPENOPTIONSPAGE)
192 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateOpenOptionsPageFunction);
193 };
194
178 class InputMethodAPI : public BrowserContextKeyedAPI, 195 class InputMethodAPI : public BrowserContextKeyedAPI,
179 public extensions::EventRouter::Observer { 196 public extensions::EventRouter::Observer {
180 public: 197 public:
181 explicit InputMethodAPI(content::BrowserContext* context); 198 explicit InputMethodAPI(content::BrowserContext* context);
182 ~InputMethodAPI() override; 199 ~InputMethodAPI() override;
183 200
184 // Returns input method name for the given XKB (X keyboard extensions in X 201 // Returns input method name for the given XKB (X keyboard extensions in X
185 // Window System) id. 202 // Window System) id.
186 static std::string GetInputMethodForXkb(const std::string& xkb_id); 203 static std::string GetInputMethodForXkb(const std::string& xkb_id);
187 204
(...skipping 23 matching lines...) Expand all
211 std::unique_ptr<chromeos::ExtensionDictionaryEventRouter> 228 std::unique_ptr<chromeos::ExtensionDictionaryEventRouter>
212 dictionary_event_router_; 229 dictionary_event_router_;
213 std::unique_ptr<chromeos::ExtensionImeMenuEventRouter> ime_menu_event_router_; 230 std::unique_ptr<chromeos::ExtensionImeMenuEventRouter> ime_menu_event_router_;
214 231
215 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI); 232 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI);
216 }; 233 };
217 234
218 } // namespace extensions 235 } // namespace extensions
219 236
220 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 237 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698