Revert of Use apps::AppEventRouter to launch app_shell apps...

Revert of Use apps::AppEventRouter to launch app_shell apps (https://codereview.chromium.org/219513005/)

Reason for revert:
This creates an unwanted dependency from app_shell back onto apps (we're moving it to depend only on extensions to keep the binary small).


Original issue's description:
> Use apps::AppEventRouter to launch app_shell apps
> 
> Now that the app_runtime API has moved to //apps we can eliminate a small
> amount of code duplication in app_shell.
> 
> BUG=357818
> TEST=app_shell launches calculator
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260647

TBR=rockot@chromium.org
NOTRY=true
BUG=357818

Review URL: https://codereview.chromium.org/224173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261455 0039d316-1c4b-4281-b951-d872f2087c98
parent db5c3a6e
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <string> #include <string>
#include "apps/app_window_registry.h" #include "apps/app_window_registry.h"
#include "apps/browser/api/app_runtime/app_runtime_api.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
...@@ -75,8 +74,16 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) { ...@@ -75,8 +74,16 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) {
content::Source<BrowserContext>(browser_context_), content::Source<BrowserContext>(browser_context_),
content::NotificationService::NoDetails()); content::NotificationService::NoDetails());
// Launch the app. // This is effectively the same behavior as
apps::AppEventRouter::DispatchOnLaunchedEvent(browser_context_, extension); // 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());
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment