| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h" | 12 #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h" |
| 13 #include "chrome/common/extensions/api/input_ime/input_components_handler.h" | 13 #include "chrome/common/extensions/api/input_ime/input_components_handler.h" |
| 14 #include "extensions/browser/extension_function.h" | 14 #include "extensions/browser/extension_function.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 | 17 |
| 18 class InputMethodEngine; | 18 class InputMethodEngine; |
| 19 | 19 |
| 20 } // namespace chromeos | 20 } // namespace chromeos |
| 21 | 21 |
| 22 namespace extensions { | 22 namespace extensions { |
| 23 | 23 |
| 24 class InputImeSetCompositionFunction : public SyncExtensionFunction { | |
| 25 public: | |
| 26 DECLARE_EXTENSION_FUNCTION("input.ime.setComposition", | |
| 27 INPUT_IME_SETCOMPOSITION) | |
| 28 | |
| 29 protected: | |
| 30 ~InputImeSetCompositionFunction() override {} | |
| 31 | |
| 32 // ExtensionFunction: | |
| 33 bool RunSync() override; | |
| 34 }; | |
| 35 | |
| 36 class InputImeClearCompositionFunction : public SyncExtensionFunction { | 24 class InputImeClearCompositionFunction : public SyncExtensionFunction { |
| 37 public: | 25 public: |
| 38 DECLARE_EXTENSION_FUNCTION("input.ime.clearComposition", | 26 DECLARE_EXTENSION_FUNCTION("input.ime.clearComposition", |
| 39 INPUT_IME_CLEARCOMPOSITION) | 27 INPUT_IME_CLEARCOMPOSITION) |
| 40 | 28 |
| 41 protected: | 29 protected: |
| 42 ~InputImeClearCompositionFunction() override {} | 30 ~InputImeClearCompositionFunction() override {} |
| 43 | 31 |
| 44 // ExtensionFunction: | 32 // ExtensionFunction: |
| 45 bool RunSync() override; | 33 bool RunSync() override; |
| 46 }; | 34 }; |
| 47 | 35 |
| 48 class InputImeCommitTextFunction : public SyncExtensionFunction { | |
| 49 public: | |
| 50 DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT) | |
| 51 | |
| 52 protected: | |
| 53 ~InputImeCommitTextFunction() override {} | |
| 54 | |
| 55 // ExtensionFunction: | |
| 56 bool RunSync() override; | |
| 57 }; | |
| 58 | |
| 59 class InputImeSetCandidateWindowPropertiesFunction | 36 class InputImeSetCandidateWindowPropertiesFunction |
| 60 : public SyncExtensionFunction { | 37 : public SyncExtensionFunction { |
| 61 public: | 38 public: |
| 62 DECLARE_EXTENSION_FUNCTION("input.ime.setCandidateWindowProperties", | 39 DECLARE_EXTENSION_FUNCTION("input.ime.setCandidateWindowProperties", |
| 63 INPUT_IME_SETCANDIDATEWINDOWPROPERTIES) | 40 INPUT_IME_SETCANDIDATEWINDOWPROPERTIES) |
| 64 | 41 |
| 65 protected: | 42 protected: |
| 66 ~InputImeSetCandidateWindowPropertiesFunction() override {} | 43 ~InputImeSetCandidateWindowPropertiesFunction() override {} |
| 67 | 44 |
| 68 // ExtensionFunction: | 45 // ExtensionFunction: |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 private: | 145 private: |
| 169 // The engine map from extension_id to an engine. | 146 // The engine map from extension_id to an engine. |
| 170 std::map<std::string, chromeos::InputMethodEngine*> engine_map_; | 147 std::map<std::string, chromeos::InputMethodEngine*> engine_map_; |
| 171 | 148 |
| 172 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter); | 149 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter); |
| 173 }; | 150 }; |
| 174 | 151 |
| 175 } // namespace extensions | 152 } // namespace extensions |
| 176 | 153 |
| 177 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ | 154 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |
| OLD | NEW |