| Index: chrome/browser/chromeos/extensions/input_method_api.h
|
| diff --git a/chrome/browser/chromeos/extensions/input_method_api.h b/chrome/browser/chromeos/extensions/input_method_api.h
|
| index 37bd9d2d1d2cd68eeb43c7e90ce93f721577ff0d..bdadd7613d906642fd0911b419e745bb877a6a40 100644
|
| --- a/chrome/browser/chromeos/extensions/input_method_api.h
|
| +++ b/chrome/browser/chromeos/extensions/input_method_api.h
|
| @@ -6,7 +6,14 @@
|
| #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/extensions/event_router.h"
|
| #include "chrome/browser/extensions/extension_function.h"
|
| +#include "chrome/browser/profiles/profile_keyed_service.h"
|
| +
|
| +namespace chromeos {
|
| +class ExtensionInputMethodEventRouter;
|
| +}
|
|
|
| namespace extensions {
|
|
|
| @@ -24,6 +31,32 @@ class GetInputMethodFunction : public SyncExtensionFunction {
|
| DECLARE_EXTENSION_FUNCTION_NAME("inputMethodPrivate.get");
|
| };
|
|
|
| +class InputMethodAPI : public ProfileKeyedService,
|
| + public extensions::EventRouter::Observer {
|
| + public:
|
| + explicit InputMethodAPI(Profile* profile);
|
| + virtual ~InputMethodAPI();
|
| +
|
| + // Convenience method to get the InputMethodAPI for a profile.
|
| + static InputMethodAPI* Get(Profile* profile);
|
| +
|
| + chromeos::ExtensionInputMethodEventRouter* input_method_event_router();
|
| +
|
| + // ProfileKeyedService implementation.
|
| + virtual void Shutdown() OVERRIDE;
|
| +
|
| + // EventRouter::Observer implementation.
|
| + virtual void OnListenerAdded(const extensions::EventListenerInfo& details)
|
| + OVERRIDE;
|
| +
|
| + private:
|
| + Profile* profile_;
|
| +
|
| + // Created lazily upon OnListenerAdded.
|
| + scoped_ptr<chromeos::ExtensionInputMethodEventRouter>
|
| + input_method_event_router_;
|
| +};
|
| +
|
| } // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
|
|
|