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 fdb6a9f1e331be798eb8b3690320c0b48b582b2e..fd0bc087c35ef71d5e80de37f07d9d1b53ee9bcd 100644 |
--- a/chrome/browser/ui/extensions/app_launch_params.cc |
+++ b/chrome/browser/ui/extensions/app_launch_params.cc |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/extensions/launch_util.h" |
#include "chrome/browser/profiles/profile.h" |
#include "extensions/browser/extension_prefs.h" |
+#include "extensions/common/constants.h" |
#include "extensions/common/extension.h" |
using extensions::ExtensionPrefs; |
@@ -14,7 +15,8 @@ using extensions::ExtensionPrefs; |
AppLaunchParams::AppLaunchParams(Profile* profile, |
const extensions::Extension* extension, |
extensions::LaunchContainer container, |
- WindowOpenDisposition disposition) |
+ WindowOpenDisposition disposition, |
+ extensions::AppLaunchSource source) |
: profile(profile), |
extension_id(extension ? extension->id() : std::string()), |
container(container), |
@@ -23,12 +25,13 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
override_url(), |
override_bounds(), |
command_line(CommandLine::NO_PROGRAM), |
- source(extensions::SOURCE_UNTRACKED) { |
+ source(source) { |
} |
AppLaunchParams::AppLaunchParams(Profile* profile, |
const extensions::Extension* extension, |
- WindowOpenDisposition disposition) |
+ WindowOpenDisposition disposition, |
+ extensions::AppLaunchSource source) |
: profile(profile), |
extension_id(extension ? extension->id() : std::string()), |
container(extensions::LAUNCH_CONTAINER_NONE), |
@@ -37,7 +40,7 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
override_url(), |
override_bounds(), |
command_line(CommandLine::NO_PROGRAM), |
- source(extensions::SOURCE_UNTRACKED) { |
+ source(source) { |
// Look up the app preference to find out the right launch container. Default |
// is to launch as a regular tab. |
container = |
@@ -47,7 +50,8 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
AppLaunchParams::AppLaunchParams(Profile* profile, |
const extensions::Extension* extension, |
int event_flags, |
- chrome::HostDesktopType desktop_type) |
+ chrome::HostDesktopType desktop_type, |
+ extensions::AppLaunchSource source) |
: profile(profile), |
extension_id(extension ? extension->id() : std::string()), |
container(extensions::LAUNCH_CONTAINER_NONE), |
@@ -56,7 +60,7 @@ AppLaunchParams::AppLaunchParams(Profile* profile, |
override_url(), |
override_bounds(), |
command_line(CommandLine::NO_PROGRAM), |
- source(extensions::SOURCE_UNTRACKED) { |
+ source(source) { |
if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) { |
container = extensions::LAUNCH_CONTAINER_TAB; |
} else if (disposition == NEW_WINDOW) { |