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

Side by Side Diff: chrome/browser/ui/extensions/app_launch_params.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/extensions/app_launch_params.h" 5 #include "chrome/browser/ui/extensions/app_launch_params.h"
6 6
7 #include "chrome/browser/extensions/launch_util.h" 7 #include "chrome/browser/extensions/launch_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "extensions/browser/extension_prefs.h" 9 #include "extensions/browser/extension_prefs.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 source(source) { 44 source(source) {
45 // Look up the app preference to find out the right launch container. Default 45 // Look up the app preference to find out the right launch container. Default
46 // is to launch as a regular tab. 46 // is to launch as a regular tab.
47 container = 47 container =
48 extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension); 48 extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension);
49 } 49 }
50 50
51 AppLaunchParams::AppLaunchParams(Profile* profile, 51 AppLaunchParams::AppLaunchParams(Profile* profile,
52 const extensions::Extension* extension, 52 const extensions::Extension* extension,
53 WindowOpenDisposition raw_disposition, 53 WindowOpenDisposition raw_disposition,
54 chrome::HostDesktopType desktop_type, 54 ui::HostDesktopType desktop_type,
55 extensions::AppLaunchSource source) 55 extensions::AppLaunchSource source)
56 : profile(profile), 56 : profile(profile),
57 extension_id(extension ? extension->id() : std::string()), 57 extension_id(extension ? extension->id() : std::string()),
58 container(extensions::LAUNCH_CONTAINER_NONE), 58 container(extensions::LAUNCH_CONTAINER_NONE),
59 desktop_type(desktop_type), 59 desktop_type(desktop_type),
60 override_url(), 60 override_url(),
61 override_bounds(), 61 override_bounds(),
62 command_line(base::CommandLine::NO_PROGRAM), 62 command_line(base::CommandLine::NO_PROGRAM),
63 source(source) { 63 source(source) {
64 if (raw_disposition == NEW_FOREGROUND_TAB || 64 if (raw_disposition == NEW_FOREGROUND_TAB ||
65 raw_disposition == NEW_BACKGROUND_TAB) { 65 raw_disposition == NEW_BACKGROUND_TAB) {
66 container = extensions::LAUNCH_CONTAINER_TAB; 66 container = extensions::LAUNCH_CONTAINER_TAB;
67 disposition = raw_disposition; 67 disposition = raw_disposition;
68 } else if (raw_disposition == NEW_WINDOW) { 68 } else if (raw_disposition == NEW_WINDOW) {
69 container = extensions::LAUNCH_CONTAINER_WINDOW; 69 container = extensions::LAUNCH_CONTAINER_WINDOW;
70 disposition = raw_disposition; 70 disposition = raw_disposition;
71 } else { 71 } else {
72 // Look at preference to find the right launch container. If no preference 72 // Look at preference to find the right launch container. If no preference
73 // is set, launch as a regular tab. 73 // is set, launch as a regular tab.
74 container = 74 container =
75 extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension); 75 extensions::GetLaunchContainer(ExtensionPrefs::Get(profile), extension);
76 disposition = NEW_FOREGROUND_TAB; 76 disposition = NEW_FOREGROUND_TAB;
77 } 77 }
78 } 78 }
79 79
80 AppLaunchParams::~AppLaunchParams() { 80 AppLaunchParams::~AppLaunchParams() {
81 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698