| Index: apps/shell/browser/shell_extension_system.cc
|
| diff --git a/apps/shell/browser/shell_extension_system.cc b/apps/shell/browser/shell_extension_system.cc
|
| index ff74ae566c72d9d0c9604bb5b78617d34f1b7820..3eb11520d90c7a4ea5c1845fe174804a90d0c2e4 100644
|
| --- a/apps/shell/browser/shell_extension_system.cc
|
| +++ b/apps/shell/browser/shell_extension_system.cc
|
| @@ -7,6 +7,7 @@
|
| #include <string>
|
|
|
| #include "apps/app_window_registry.h"
|
| +#include "apps/browser/api/app_runtime/app_runtime_api.h"
|
| #include "base/command_line.h"
|
| #include "base/files/file_path.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| @@ -74,16 +75,8 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) {
|
| content::Source<BrowserContext>(browser_context_),
|
| content::NotificationService::NoDetails());
|
|
|
| - // This is effectively the same behavior as
|
| - // apps::AppEventRouter::DispatchOnLaunchedEvent without any dependency
|
| - // on ExtensionSystem or Profile.
|
| - scoped_ptr<base::DictionaryValue> launch_data(new base::DictionaryValue());
|
| - launch_data->SetBoolean("isKioskSession", false);
|
| - scoped_ptr<base::ListValue> event_args(new base::ListValue());
|
| - event_args->Append(launch_data.release());
|
| - scoped_ptr<Event> event(
|
| - new Event("app.runtime.onLaunched", event_args.Pass()));
|
| - event_router_->DispatchEventWithLazyListener(extension->id(), event.Pass());
|
| + // Launch the app.
|
| + apps::AppEventRouter::DispatchOnLaunchedEvent(browser_context_, extension);
|
|
|
| return true;
|
| }
|
|
|