Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api.h

Issue 11618005: Pull InputIme stuff out of ExtensionService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit fixed Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4651d3546db589a3c3594f600766abf73f533804 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,24 @@ class KeyEventHandled : public AsyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
};
+class InputImeAPI : public ProfileKeyedService,
+ public content::NotificationObserver {
+ public:
+ explicit InputImeAPI(Profile* profile);
+ virtual ~InputImeAPI();
+
+ // content::NotificationObserver implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ private:
+ InputImeEventRouter* input_ime_event_router();
+
+ Profile* const profile_;
+ content::NotificationRegistrar registrar_;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698