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

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

Issue 720633003: Revert of CL 722703002 due to build breakage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 6 years, 1 month 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 883ce4710e3519cbdf23fefaa239008e198ba795..fdb6a9f1e331be798eb8b3690320c0b48b582b2e 100644
--- a/chrome/browser/ui/extensions/app_launch_params.cc
+++ b/chrome/browser/ui/extensions/app_launch_params.cc
@@ -7,17 +7,14 @@
#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"
-#include "ui/base/window_open_disposition.h"
using extensions::ExtensionPrefs;
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
extensions::LaunchContainer container,
- WindowOpenDisposition disposition,
- extensions::AppLaunchSource source)
+ WindowOpenDisposition disposition)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(container),
@@ -26,13 +23,12 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(source) {
+ source(extensions::SOURCE_UNTRACKED) {
}
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
- WindowOpenDisposition disposition,
- extensions::AppLaunchSource source)
+ WindowOpenDisposition disposition)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(extensions::LAUNCH_CONTAINER_NONE),
@@ -41,7 +37,7 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(source) {
+ source(extensions::SOURCE_UNTRACKED) {
// Look up the app preference to find out the right launch container. Default
// is to launch as a regular tab.
container =
@@ -50,24 +46,21 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
- WindowOpenDisposition raw_disposition,
- chrome::HostDesktopType desktop_type,
- extensions::AppLaunchSource source)
+ int event_flags,
+ chrome::HostDesktopType desktop_type)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(extensions::LAUNCH_CONTAINER_NONE),
+ disposition(ui::DispositionFromEventFlags(event_flags)),
desktop_type(desktop_type),
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(source) {
- if (raw_disposition == NEW_FOREGROUND_TAB ||
- raw_disposition == NEW_BACKGROUND_TAB) {
+ source(extensions::SOURCE_UNTRACKED) {
+ if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) {
container = extensions::LAUNCH_CONTAINER_TAB;
- disposition = raw_disposition;
- } else if (raw_disposition == NEW_WINDOW) {
+ } else if (disposition == NEW_WINDOW) {
container = extensions::LAUNCH_CONTAINER_WINDOW;
- disposition = raw_disposition;
} else {
// Look at preference to find the right launch container. If no preference
// is set, launch as a regular tab.
« 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