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

Unified Diff: apps/shell/browser/shell_extension_system.cc

Issue 219513005: Use apps::AppEventRouter to launch app_shell apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698