Chromium Code Reviews| Index: chrome/browser/ui/extensions/application_launch.cc |
| diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc |
| index 74ce425b27a4c7a6b53dae6f9dbbeb69348873bd..a09cac83c3672bcab22daf63035dce2258640b73 100644 |
| --- a/chrome/browser/ui/extensions/application_launch.cc |
| +++ b/chrome/browser/ui/extensions/application_launch.cc |
| @@ -8,6 +8,7 @@ |
| #include "apps/launcher.h" |
| #include "base/command_line.h" |
| +#include "base/logging.h" |
| #include "base/metrics/histogram.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/app_mode/app_mode_utils.h" |
| @@ -302,8 +303,13 @@ WebContents* OpenEnabledApplication(const AppLaunchParams& params) { |
| PerAppSettingsServiceFactory::GetForBrowserContext(profile)-> |
| SetDesktopLastLaunchedFrom(extension->id(), params.desktop_type); |
| - apps::LaunchPlatformAppWithCommandLine( |
| - profile, extension, params.command_line, params.current_directory); |
| + VLOG(2) << "Launch source: " << params.source; |
|
benwells
2014/10/28 21:22:47
Please remove before landing.
cylee1
2014/10/29 16:39:59
Done.
|
| + |
| + apps::LaunchPlatformAppWithCommandLine(profile, |
| + extension, |
| + params.command_line, |
| + params.current_directory, |
| + params.source); |
| return NULL; |
| } |
| @@ -344,7 +350,9 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
| desktop_type(chrome::GetActiveDesktop()), |
| override_url(), |
| override_bounds(), |
| - command_line(CommandLine::NO_PROGRAM) {} |
| + command_line(CommandLine::NO_PROGRAM), |
| + source(extensions::SOURCE_UNKNOWN) { |
|
benwells
2014/10/28 21:22:47
Do you have any idea how many instances of launchi
cylee1
2014/10/29 16:39:59
I've checked all calls to OpenApplication (https:/
benwells
2014/10/30 06:04:28
I am OK with starting like this, but I think you'v
cylee1
2014/10/30 13:03:43
In my proposal document I've listed a bunch of sou
cylee1
2014/10/31 06:37:53
I got what you mean, but I think it's fine to chan
|
| +} |
| AppLaunchParams::AppLaunchParams(Profile* profile, |
| const extensions::Extension* extension, |
| @@ -356,7 +364,8 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
| desktop_type(chrome::GetActiveDesktop()), |
| override_url(), |
| override_bounds(), |
| - command_line(CommandLine::NO_PROGRAM) { |
| + command_line(CommandLine::NO_PROGRAM), |
| + source(extensions::SOURCE_UNKNOWN) { |
| // Look up the app preference to find out the right launch container. Default |
| // is to launch as a regular tab. |
| container = |
| @@ -374,7 +383,8 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
| desktop_type(desktop_type), |
| override_url(), |
| override_bounds(), |
| - command_line(CommandLine::NO_PROGRAM) { |
| + command_line(CommandLine::NO_PROGRAM), |
| + source(extensions::SOURCE_UNKNOWN) { |
| if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) { |
| container = extensions::LAUNCH_CONTAINER_TAB; |
| } else if (disposition == NEW_WINDOW) { |