summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/input_ime
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 19:01:45 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 19:01:45 +0000
commit9e5be1f9b0cc734f0f83c2caeddd78a1ce3a37b3 (patch)
tree26810ec06e27313525c935804c59c578571b376f /chrome/browser/extensions/api/input_ime
parent090c4f1e220d050fdd991e89baa90410caeacf30 (diff)
downloadchromium_src-9e5be1f9b0cc734f0f83c2caeddd78a1ce3a37b3.zip
chromium_src-9e5be1f9b0cc734f0f83c2caeddd78a1ce3a37b3.tar.gz
chromium_src-9e5be1f9b0cc734f0f83c2caeddd78a1ce3a37b3.tar.bz2
Remove GetExtensionEventRouter calls and replace with PKSF calls through the ExtensionSystem. Extension services were made into ProfileKeyedServices a while ago; this replaces all the deprecated calls that ran directly through the Profile object.
BUG= http://code.google.com/p/chromium/issues/detail?id=104095 Review URL: https://chromiumcodereview.appspot.com/11232066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/input_ime')
-rw-r--r--chrome/browser/extensions/api/input_ime/input_ime_api.cc44
1 files changed, 25 insertions, 19 deletions
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
index df0f010..fb5838c 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/chromeos/input_method/input_method_engine.h"
#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/extensions/extension_input_module_constants.h"
+#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
namespace keys = extension_input_module_constants;
@@ -158,8 +159,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
scoped_ptr<base::ListValue> args(new ListValue());
args->Append(Value::CreateStringValue(engine_id));
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnActivate, args.Pass(), profile_, GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnActivate,
+ args.Pass(), profile_, GURL());
}
virtual void OnDeactivated(const std::string& engine_id) {
@@ -169,8 +171,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
scoped_ptr<base::ListValue> args(new ListValue());
args->Append(Value::CreateStringValue(engine_id));
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnDeactivated, args.Pass(), profile_, GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnDeactivated,
+ args.Pass(), profile_, GURL());
}
virtual void OnFocus(const InputMethodEngine::InputContext& context) {
@@ -184,8 +187,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
scoped_ptr<base::ListValue> args(new ListValue());
args->Append(dict);
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnFocus, args.Pass(), profile_, GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnFocus,
+ args.Pass(), profile_, GURL());
}
virtual void OnBlur(int context_id) {
@@ -195,8 +199,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
scoped_ptr<base::ListValue> args(new ListValue());
args->Append(Value::CreateIntegerValue(context_id));
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnBlur, args.Pass(), profile_, GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnBlur,
+ args.Pass(), profile_, GURL());
}
virtual void OnInputContextUpdate(
@@ -211,9 +216,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
scoped_ptr<base::ListValue> args(new ListValue());
args->Append(dict);
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnInputContextUpdate, args.Pass(), profile_,
- GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnInputContextUpdate,
+ args.Pass(), profile_, GURL());
}
virtual void OnKeyEvent(const std::string& engine_id,
@@ -238,8 +243,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
args->Append(Value::CreateStringValue(engine_id));
args->Append(dict);
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnKeyEvent, args.Pass(), profile_, GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnKeyEvent,
+ args.Pass(), profile_, GURL());
}
virtual void OnCandidateClicked(
@@ -268,9 +274,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
break;
}
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnCandidateClicked, args.Pass(), profile_,
- GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnCandidateClicked,
+ args.Pass(), profile_, GURL());
}
virtual void OnMenuItemActivated(const std::string& engine_id,
@@ -282,9 +288,9 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer {
args->Append(Value::CreateStringValue(engine_id));
args->Append(Value::CreateStringValue(menu_id));
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, events::kOnMenuItemActivated, args.Pass(), profile_,
- GURL());
+ extensions::ExtensionSystem::Get(profile_)->event_router()->
+ DispatchEventToExtension(extension_id_, events::kOnMenuItemActivated,
+ args.Pass(), profile_, GURL());
}
private: