Chromium Code Reviews| Index: chrome/browser/extensions/api/input_ime/input_ime_api.h |
| diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h |
| index 5708a3f8d03c7486fc96cc06e562d11c2a98b154..a62e89030924a32efb2667140320815a2521a257 100644 |
| --- a/chrome/browser/extensions/api/input_ime/input_ime_api.h |
| +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h |
| @@ -5,16 +5,18 @@ |
| #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
| #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
| -#include "chrome/browser/extensions/extension_function.h" |
| +#include <map> |
| +#include <string> |
| +#include <vector> |
| #include "base/memory/singleton.h" |
| #include "base/values.h" |
| #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| +#include "chrome/browser/extensions/extension_function.h" |
| +#include "chrome/browser/profiles/profile_keyed_service.h" |
| #include "chrome/common/extensions/extension.h" |
| - |
| -#include <map> |
| -#include <string> |
| -#include <vector> |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| class Profile; |
| @@ -28,7 +30,6 @@ namespace extensions { |
| class InputImeEventRouter { |
| public: |
| static InputImeEventRouter* GetInstance(); |
| - void Init(); |
| bool RegisterIme(Profile* profile, |
| const std::string& extension_id, |
| @@ -170,6 +171,27 @@ class KeyEventHandled : public AsyncExtensionFunction { |
| virtual bool RunImpl() OVERRIDE; |
| }; |
| +class InputImeAPI : public ProfileKeyedService, |
| + public content::NotificationObserver { |
| + public: |
| + explicit InputImeAPI(Profile* profile); |
| + virtual ~InputImeAPI(); |
| + |
| + // ProfileKeyedService implementation. |
| + virtual void Shutdown() OVERRIDE; |
|
Yoyo Zhou
2012/12/18 22:39:16
You don't need this if it does nothing.
Joe Thomas
2012/12/18 22:53:03
Done.
|
| + |
| + InputImeEventRouter* input_ime_event_router(); |
|
Yoyo Zhou
2012/12/18 22:39:16
Doesn't need to be public.
Joe Thomas
2012/12/18 22:53:03
Done.
|
| + |
| + // content::NotificationObserver implementation. |
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| + private: |
| + Profile* const profile_; |
| + content::NotificationRegistrar registrar_; |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |