summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api/app_runtime/app_runtime_api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/browser/api/app_runtime/app_runtime_api.cc')
-rw-r--r--extensions/browser/api/app_runtime/app_runtime_api.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/extensions/browser/api/app_runtime/app_runtime_api.cc b/extensions/browser/api/app_runtime/app_runtime_api.cc
index 7839b72..e393c1d 100644
--- a/extensions/browser/api/app_runtime/app_runtime_api.cc
+++ b/extensions/browser/api/app_runtime/app_runtime_api.cc
@@ -30,8 +30,9 @@ void DispatchOnEmbedRequestedEventImpl(
content::BrowserContext* context) {
scoped_ptr<base::ListValue> args(new base::ListValue());
args->Append(app_embedding_request_data.release());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnEmbedRequested::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_EMBED_REQUESTED,
+ app_runtime::OnEmbedRequested::kEventName,
+ args.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventWithLazyListener(extension_id, event.Pass());
@@ -53,8 +54,9 @@ void DispatchOnLaunchedEventImpl(const std::string& extension_id,
ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode());
scoped_ptr<base::ListValue> args(new base::ListValue());
args->Append(launch_data.release());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnLaunched::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_LAUNCHED,
+ app_runtime::OnLaunched::kEventName,
+ args.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventWithLazyListener(extension_id, event.Pass());
@@ -138,8 +140,9 @@ void AppRuntimeEventRouter::DispatchOnRestartedEvent(
BrowserContext* context,
const Extension* extension) {
scoped_ptr<base::ListValue> arguments(new base::ListValue());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnRestarted::kEventName, arguments.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_RESTARTED,
+ app_runtime::OnRestarted::kEventName,
+ arguments.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventToExtension(extension->id(), event.Pass());