diff options
author | limasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-22 16:55:58 +0000 |
---|---|---|
committer | limasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-22 16:55:58 +0000 |
commit | 869f74b905354c029278f7ee2261d455cb334a24 (patch) | |
tree | 488c5a506787a8ebf1439e0f77f71666e756540d /apps | |
parent | 5ddc607dacb4d33996eb9f4aaf1804cbb8177f0c (diff) | |
download | chromium_src-869f74b905354c029278f7ee2261d455cb334a24.zip chromium_src-869f74b905354c029278f7ee2261d455cb334a24.tar.gz chromium_src-869f74b905354c029278f7ee2261d455cb334a24.tar.bz2 |
cleanup: Use EventRouter and some cleanups.
BUG=362672
Review URL: https://codereview.chromium.org/244363002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/browser/api/app_runtime/app_runtime_api.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/browser/api/app_runtime/app_runtime_api.cc b/apps/browser/api/app_runtime/app_runtime_api.cc index 5b52100..65ebf61 100644 --- a/apps/browser/api/app_runtime/app_runtime_api.cc +++ b/apps/browser/api/app_runtime/app_runtime_api.cc @@ -10,16 +10,13 @@ #include "base/values.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_prefs.h" -#include "extensions/browser/extension_system.h" #include "extensions/browser/extensions_browser_client.h" -#include "extensions/common/extension.h" #include "url/gurl.h" using content::BrowserContext; using extensions::Event; using extensions::Extension; using extensions::ExtensionPrefs; -using extensions::ExtensionSystem; namespace apps { @@ -36,13 +33,12 @@ void DispatchOnLaunchedEventImpl(const std::string& extension_id, extensions::ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()); scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(launch_data.release()); - ExtensionSystem* system = ExtensionSystem::Get(context); scoped_ptr<Event> event( new Event(app_runtime::OnLaunched::kEventName, args.Pass())); event->restrict_to_browser_context = context; event->can_load_ephemeral_apps = true; - system->event_router()->DispatchEventWithLazyListener(extension_id, - event.Pass()); + extensions::EventRouter::Get(context) + ->DispatchEventWithLazyListener(extension_id, event.Pass()); ExtensionPrefs::Get(context) ->SetLastLaunchTime(extension_id, base::Time::Now()); } @@ -64,8 +60,7 @@ void AppEventRouter::DispatchOnRestartedEvent(BrowserContext* context, new Event(app_runtime::OnRestarted::kEventName, arguments.Pass())); event->restrict_to_browser_context = context; event->can_load_ephemeral_apps = true; - extensions::ExtensionSystem::Get(context) - ->event_router() + extensions::EventRouter::Get(context) ->DispatchEventToExtension(extension->id(), event.Pass()); } |