Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSION_INPUT_IME_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_function.h" | 8 #include "chrome/browser/extensions/extension_function.h" |
| 9 | 9 |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/chromeos/input_method/input_method_engine.h" | 12 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| 13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
| 14 | 14 |
| 15 #include <map> | 15 #include <map> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 class InputMethodEngine; | 22 class InputMethodEngine; |
| 23 class ImeObserver; | 23 class ImeObserver; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace extensions { | |
| 27 | |
| 26 class ExtensionInputImeEventRouter { | 28 class ExtensionInputImeEventRouter { |
|
Aaron Boodman
2012/07/23 23:48:41
The 'Extension' prefix can be removed from these n
vabr (Chromium)
2012/07/24 10:02:15
Done.
| |
| 27 public: | 29 public: |
| 28 static ExtensionInputImeEventRouter* GetInstance(); | 30 static ExtensionInputImeEventRouter* GetInstance(); |
| 29 void Init(); | 31 void Init(); |
| 30 | 32 |
| 31 bool RegisterIme(Profile* profile, | 33 bool RegisterIme(Profile* profile, |
| 32 const std::string& extension_id, | 34 const std::string& extension_id, |
| 33 const extensions::Extension::InputComponentInfo& component); | 35 const extensions::Extension::InputComponentInfo& component); |
| 34 void UnregisterAllImes(Profile* profile, const std::string& extension_id); | 36 void UnregisterAllImes(Profile* profile, const std::string& extension_id); |
| 35 chromeos::InputMethodEngine* GetEngine(const std::string& extension_id, | 37 chromeos::InputMethodEngine* GetEngine(const std::string& extension_id, |
| 36 const std::string& engine_id); | 38 const std::string& engine_id); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 public: | 163 public: |
| 162 DECLARE_EXTENSION_FUNCTION_NAME("input.ime.eventHandled"); | 164 DECLARE_EXTENSION_FUNCTION_NAME("input.ime.eventHandled"); |
| 163 | 165 |
| 164 protected: | 166 protected: |
| 165 virtual ~InputEventHandled() {} | 167 virtual ~InputEventHandled() {} |
| 166 | 168 |
| 167 // ExtensionFunction: | 169 // ExtensionFunction: |
| 168 virtual bool RunImpl() OVERRIDE; | 170 virtual bool RunImpl() OVERRIDE; |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ | 173 } // namespace extensions |
| 174 | |
| 175 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | |
| OLD | NEW |