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

Unified Diff: chrome/browser/chromeos/extensions/input_method_api.cc

Issue 238963002: Use EventRouter instead of ExtensionSystem::Get->event_router() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months 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
Index: chrome/browser/chromeos/extensions/input_method_api.cc
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc
index bb46b316b7f7539760a2806f7e1e021eea603f3f..0476253d2e09508b86ecc6856717b4a7f45bf237 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.cc
+++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -67,8 +67,7 @@ const char InputMethodAPI::kOnInputMethodChanged[] =
InputMethodAPI::InputMethodAPI(content::BrowserContext* context)
: context_(context) {
- ExtensionSystem::Get(context_)->event_router()->RegisterObserver(
- this, kOnInputMethodChanged);
+ EventRouter::Get(context_)->RegisterObserver(this, kOnInputMethodChanged);
ExtensionFunctionRegistry* registry =
ExtensionFunctionRegistry::GetInstance();
registry->RegisterFunction<GetInputMethodFunction>();
@@ -91,7 +90,7 @@ std::string InputMethodAPI::GetInputMethodForXkb(const std::string& xkb_id) {
void InputMethodAPI::Shutdown() {
// UnregisterObserver may have already been called in OnListenerAdded,
// but it is safe to call it more than once.
- ExtensionSystem::Get(context_)->event_router()->UnregisterObserver(this);
+ EventRouter::Get(context_)->UnregisterObserver(this);
}
void InputMethodAPI::OnListenerAdded(
@@ -99,7 +98,7 @@ void InputMethodAPI::OnListenerAdded(
DCHECK(!input_method_event_router_.get());
input_method_event_router_.reset(
new chromeos::ExtensionInputMethodEventRouter(context_));
- ExtensionSystem::Get(context_)->event_router()->UnregisterObserver(this);
+ EventRouter::Get(context_)->UnregisterObserver(this);
}
static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> >

Powered by Google App Engine
This is Rietveld 408576698