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..6fcef409cebf24f4994f5493e96810ae167be4d1 100644 |
--- a/chrome/browser/ui/extensions/app_launch_params.cc |
+++ b/chrome/browser/ui/extensions/app_launch_params.cc |
@@ -22,45 +22,28 @@ 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 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 CreateAppLaunchParamsOverriddenContainer( |
benwells
2016/03/16 06:29:43
All but one of the callers of this call it with ra
scottmg
2016/03/16 16:38:54
OK, for these 3, I switched to CreateAppLaunchPara
|
+ Profile* profile, |
+ const extensions::Extension* extension, |
+ WindowOpenDisposition raw_disposition, |
+ extensions::AppLaunchSource source) { |
+ extensions::LaunchContainer container; |
+ WindowOpenDisposition disposition; |
if (raw_disposition == NEW_FOREGROUND_TAB || |
raw_disposition == NEW_BACKGROUND_TAB) { |
container = extensions::LAUNCH_CONTAINER_TAB; |
@@ -75,9 +58,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); |
} |