| OLD | NEW |
| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 ~InputMethodPrivateGetEncryptSyncEnabledFunction() override {} | 132 ~InputMethodPrivateGetEncryptSyncEnabledFunction() override {} |
| 133 | 133 |
| 134 ResponseAction Run() override; | 134 ResponseAction Run() override; |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getEncryptSyncEnabled", | 137 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getEncryptSyncEnabled", |
| 138 INPUTMETHODPRIVATE_GETENCRYPTSYNCENABLED) | 138 INPUTMETHODPRIVATE_GETENCRYPTSYNCENABLED) |
| 139 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetEncryptSyncEnabledFunction); | 139 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetEncryptSyncEnabledFunction); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 // Implements the inputMethodPrivate.setXkbLayout method. |
| 143 class InputMethodPrivateSetXkbLayoutFunction |
| 144 : public UIThreadExtensionFunction { |
| 145 public: |
| 146 InputMethodPrivateSetXkbLayoutFunction() {} |
| 147 |
| 148 protected: |
| 149 ~InputMethodPrivateSetXkbLayoutFunction() override {} |
| 150 |
| 151 ResponseAction Run() override; |
| 152 |
| 153 private: |
| 154 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setXkbLayout", |
| 155 INPUTMETHODPRIVATE_SETXKBLAYOUT) |
| 156 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetXkbLayoutFunction); |
| 157 }; |
| 158 |
| 142 class InputMethodAPI : public BrowserContextKeyedAPI, | 159 class InputMethodAPI : public BrowserContextKeyedAPI, |
| 143 public extensions::EventRouter::Observer { | 160 public extensions::EventRouter::Observer { |
| 144 public: | 161 public: |
| 145 explicit InputMethodAPI(content::BrowserContext* context); | 162 explicit InputMethodAPI(content::BrowserContext* context); |
| 146 ~InputMethodAPI() override; | 163 ~InputMethodAPI() override; |
| 147 | 164 |
| 148 // Returns input method name for the given XKB (X keyboard extensions in X | 165 // Returns input method name for the given XKB (X keyboard extensions in X |
| 149 // Window System) id. | 166 // Window System) id. |
| 150 static std::string GetInputMethodForXkb(const std::string& xkb_id); | 167 static std::string GetInputMethodForXkb(const std::string& xkb_id); |
| 151 | 168 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 174 input_method_event_router_; | 191 input_method_event_router_; |
| 175 scoped_ptr<chromeos::ExtensionDictionaryEventRouter> | 192 scoped_ptr<chromeos::ExtensionDictionaryEventRouter> |
| 176 dictionary_event_router_; | 193 dictionary_event_router_; |
| 177 | 194 |
| 178 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI); | 195 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI); |
| 179 }; | 196 }; |
| 180 | 197 |
| 181 } // namespace extensions | 198 } // namespace extensions |
| 182 | 199 |
| 183 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ | 200 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ |
| OLD | NEW |