| Index: chrome/browser/ui/extensions/app_launch_params.cc
|
| diff --git a/chrome/browser/ui/extensions/app_launch_params.cc b/chrome/browser/ui/extensions/app_launch_params.cc
|
| index 0abc0a40ec0a0d2423be5f892f7d4e561c40c49b..271d87a34c9f764ebb2fd71e6f2ba26a41f74d60 100644
|
| --- a/chrome/browser/ui/extensions/app_launch_params.cc
|
| +++ b/chrome/browser/ui/extensions/app_launch_params.cc
|
| @@ -22,45 +22,35 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
|
| extension_id(extension ? extension->id() : std::string()),
|
| container(container),
|
| disposition(disposition),
|
| - desktop_type(chrome::GetActiveDesktop()),
|
| - override_url(),
|
| - override_bounds(),
|
| command_line(base::CommandLine::NO_PROGRAM),
|
| - source(source) {
|
| -}
|
| + source(source) {}
|
|
|
| -AppLaunchParams::AppLaunchParams(Profile* profile,
|
| - const extensions::Extension* extension,
|
| - WindowOpenDisposition disposition,
|
| - extensions::AppLaunchSource source)
|
| - : profile(profile),
|
| - extension_id(extension ? extension->id() : std::string()),
|
| - container(extensions::LAUNCH_CONTAINER_NONE),
|
| - disposition(disposition),
|
| - desktop_type(chrome::GetActiveDesktop()),
|
| - override_url(),
|
| - override_bounds(),
|
| - command_line(base::CommandLine::NO_PROGRAM),
|
| - source(source) {
|
| +AppLaunchParams::AppLaunchParams(const AppLaunchParams& other) = default;
|
| +
|
| +AppLaunchParams::~AppLaunchParams() {}
|
| +
|
| +AppLaunchParams CreateAppLaunchParamsUserContainer(
|
| + Profile* profile,
|
| + const extensions::Extension* extension,
|
| + WindowOpenDisposition disposition,
|
| + extensions::AppLaunchSource source) {
|
| // Look up the app preference to find out the right launch container. Default
|
| // is to launch as a regular tab.
|
| - container =
|
| + extensions::LaunchContainer container =
|
| extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension);
|
| + return AppLaunchParams(profile, extension, container, disposition, source);
|
| }
|
|
|
| -AppLaunchParams::AppLaunchParams(Profile* profile,
|
| - const extensions::Extension* extension,
|
| - WindowOpenDisposition raw_disposition,
|
| - chrome::HostDesktopType desktop_type,
|
| - extensions::AppLaunchSource source)
|
| - : profile(profile),
|
| - extension_id(extension ? extension->id() : std::string()),
|
| - container(extensions::LAUNCH_CONTAINER_NONE),
|
| - desktop_type(desktop_type),
|
| - override_url(),
|
| - override_bounds(),
|
| - command_line(base::CommandLine::NO_PROGRAM),
|
| - source(source) {
|
| +AppLaunchParams CreateAppLaunchParamsWithEventFlags(
|
| + Profile* profile,
|
| + const extensions::Extension* extension,
|
| + int event_flags,
|
| + extensions::AppLaunchSource source) {
|
| + WindowOpenDisposition raw_disposition =
|
| + ui::DispositionFromEventFlags(event_flags);
|
| +
|
| + extensions::LaunchContainer container;
|
| + WindowOpenDisposition disposition;
|
| if (raw_disposition == NEW_FOREGROUND_TAB ||
|
| raw_disposition == NEW_BACKGROUND_TAB) {
|
| container = extensions::LAUNCH_CONTAINER_TAB;
|
| @@ -75,9 +65,5 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
|
| extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension);
|
| disposition = NEW_FOREGROUND_TAB;
|
| }
|
| -}
|
| -
|
| -AppLaunchParams::AppLaunchParams(const AppLaunchParams& other) = default;
|
| -
|
| -AppLaunchParams::~AppLaunchParams() {
|
| + return AppLaunchParams(profile, extension, container, disposition, source);
|
| }
|
|
|