Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3849)

Unified Diff: chrome/browser/ui/extensions/app_launch_params.cc

Issue 1707773002: Revert of Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-15
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f099ad59b45acfa2f46e1c8b7148c33a86b21d96..80dab730223928003e4ac3a77f839fa98226c5bc 100644
--- a/chrome/browser/ui/extensions/app_launch_params.cc
+++ b/chrome/browser/ui/extensions/app_launch_params.cc
@@ -22,6 +22,7 @@ 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),
@@ -30,11 +31,32 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
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) {
+ // Look up the app preference to find out the right launch container. Default
+ // is to launch as a regular tab.
+ container =
+ extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension);
+}
+
+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),
« no previous file with comments | « chrome/browser/ui/extensions/app_launch_params.h ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698