summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2016-02-10 17:00:49 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-11 01:02:28 +0000
commit99230da5e39ce56f28f05a515941fae53ba5eded (patch)
tree9031ae5880817c6f2d85e9999e0dc0575271258e
parent3726ee3a4f55e7528d27f67549d717f12b8df278 (diff)
downloadchromium_src-99230da5e39ce56f28f05a515941fae53ba5eded.zip
chromium_src-99230da5e39ce56f28f05a515941fae53ba5eded.tar.gz
chromium_src-99230da5e39ce56f28f05a515941fae53ba5eded.tar.bz2
Remove HostDesktopType from AppLaunchParams
R=sky@chromium.org, benwells@chromium.org BUG=558054 Review URL: https://codereview.chromium.org/1685883003 Cr-Commit-Position: refs/heads/master@{#374814}
-rw-r--r--chrome/browser/apps/app_browsertest.cc1
-rw-r--r--chrome/browser/chromeos/first_run/first_run_controller.cc4
-rw-r--r--chrome/browser/extensions/api/identity/gaia_web_auth_flow.h2
-rw-r--r--chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc3
-rw-r--r--chrome/browser/ui/app_list/app_list_controller_delegate_impl.h4
-rw-r--r--chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc4
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc6
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc2
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc1
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_common.cc1
-rw-r--r--chrome/browser/ui/chrome_pages.cc13
-rw-r--r--chrome/browser/ui/chrome_pages.h2
-rw-r--r--chrome/browser/ui/extensions/app_launch_params.cc22
-rw-r--r--chrome/browser/ui/extensions/app_launch_params.h14
-rw-r--r--chrome/browser/ui/extensions/application_launch.cc9
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_impl.cc1
-rw-r--r--chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc4
-rw-r--r--chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h3
18 files changed, 15 insertions, 81 deletions
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index ebe77d9..a110951 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -1229,7 +1229,6 @@ IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest, IncognitoComponentApp) {
registry->AddObserver(this);
OpenApplication(AppLaunchParams(incognito_profile, file_manager, CURRENT_TAB,
- chrome::HOST_DESKTOP_TYPE_NATIVE,
extensions::SOURCE_TEST));
while (!ContainsKey(opener_app_ids_, file_manager->id())) {
diff --git a/chrome/browser/chromeos/first_run/first_run_controller.cc b/chrome/browser/chromeos/first_run/first_run_controller.cc
index 02b8cf1..bb44a54 100644
--- a/chrome/browser/chromeos/first_run/first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/first_run_controller.cc
@@ -123,9 +123,7 @@ void FirstRunController::OnNextButtonClicked(const std::string& step_name) {
void FirstRunController::OnHelpButtonClicked() {
RecordCompletion(first_run::TUTORIAL_COMPLETED_WITH_KEEP_EXPLORING);
- on_actor_finalized_ = base::Bind(chrome::ShowHelpForProfile,
- user_profile_,
- chrome::HOST_DESKTOP_TYPE_ASH,
+ on_actor_finalized_ = base::Bind(chrome::ShowHelpForProfile, user_profile_,
chrome::HELP_SOURCE_MENU);
actor_->Finalize();
}
diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h
index e9685b5..e00847b 100644
--- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h
+++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h
@@ -8,7 +8,6 @@
#include "base/macros.h"
#include "chrome/browser/extensions/api/identity/extension_token_key.h"
#include "chrome/browser/extensions/api/identity/web_auth_flow.h"
-#include "chrome/browser/ui/host_desktop.h"
#include "extensions/common/manifest_handlers/oauth2_manifest_handler.h"
#include "google_apis/gaia/ubertoken_fetcher.h"
@@ -87,7 +86,6 @@ class GaiaWebAuthFlow : public UbertokenConsumer, public WebAuthFlow::Delegate {
Delegate* delegate_;
Profile* profile_;
std::string account_id_;
- chrome::HostDesktopType host_desktop_type_;
std::string redirect_scheme_;
std::string redirect_path_prefix_;
GURL auth_url_;
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc
index c84f4d5..6b9e598 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc
@@ -124,7 +124,6 @@ void AppListControllerDelegateImpl::LaunchApp(
AppListSourceToString(source));
}
- FillLaunchParams(&params);
OpenApplication(params);
}
@@ -138,8 +137,6 @@ bool AppListControllerDelegateImpl::ShouldShowUserIcon() {
return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1;
}
-void AppListControllerDelegateImpl::FillLaunchParams(AppLaunchParams* params) {}
-
void AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt(
bool created) {
OnCloseChildDialog();
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
index 8aefc2a8..4034d26 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
@@ -55,10 +55,6 @@ class AppListControllerDelegateImpl : public AppListControllerDelegate {
void ShowForProfileByPath(const base::FilePath& profile_path) override;
bool ShouldShowUserIcon() override;
- protected:
- // Perform platform-specific adjustments of |params| before OpenApplication().
- virtual void FillLaunchParams(AppLaunchParams* params);
-
private:
void OnCloseCreateShortcutsPrompt(bool created);
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
index 9c5ca6d..45b8a34 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
@@ -40,14 +40,12 @@ void ChromeNewWindowDelegateChromeos::OpenFileManager() {
const extensions::Extension* const extension =
service->GetInstalledExtension(kFileManagerAppId);
OpenApplication(AppLaunchParams(profile, extension, CURRENT_TAB,
- chrome::HOST_DESKTOP_TYPE_ASH,
extensions::SOURCE_KEYBOARD));
}
void ChromeNewWindowDelegateChromeos::OpenGetHelp() {
Profile* const profile = ProfileManager::GetActiveUserProfile();
- chrome::ShowHelpForProfile(
- profile, chrome::HOST_DESKTOP_TYPE_ASH, chrome::HELP_SOURCE_KEYBOARD);
+ chrome::ShowHelpForProfile(profile, chrome::HELP_SOURCE_KEYBOARD);
}
void ChromeNewWindowDelegateChromeos::OpenCrosh() {
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index dd9c48e..61adb3f 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -780,9 +780,9 @@ void ChromeLauncherController::LaunchApp(const std::string& app_id,
}
// The app will be created for the currently active profile.
- AppLaunchParams params(
- profile_, extension, ui::DispositionFromEventFlags(event_flags),
- chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER);
+ AppLaunchParams params(profile_, extension,
+ ui::DispositionFromEventFlags(event_flags),
+ extensions::SOURCE_APP_LAUNCHER);
if (source != ash::LAUNCH_FROM_UNKNOWN &&
app_id == extensions::kWebStoreAppId) {
// Get the corresponding source string.
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index d6fbec0..049b6a5 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -2136,7 +2136,7 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) {
// Create a windowed application.
AppLaunchParams params(
profile(), controller_->GetExtensionForAppID(extensions::kWebStoreAppId),
- CURRENT_TAB, chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_TEST);
+ CURRENT_TAB, extensions::SOURCE_TEST);
params.container = extensions::LAUNCH_CONTAINER_WINDOW;
OpenApplication(params);
EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status);
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index b42266d..29553ca 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -516,7 +516,6 @@ void SystemTrayDelegateChromeOS::ShowIMESettings() {
void SystemTrayDelegateChromeOS::ShowHelp() {
chrome::ShowHelpForProfile(ProfileManager::GetActiveUserProfile(),
- chrome::HOST_DESKTOP_TYPE_ASH,
chrome::HELP_SOURCE_MENU);
}
diff --git a/chrome/browser/ui/ash/system_tray_delegate_common.cc b/chrome/browser/ui/ash/system_tray_delegate_common.cc
index eb151dd..3c5bb4d 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_common.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_common.cc
@@ -89,7 +89,6 @@ void SystemTrayDelegateCommon::ShowChromeSlow() {
void SystemTrayDelegateCommon::ShowHelp() {
chrome::ShowHelpForProfile(ProfileManager::GetLastUsedProfile(),
- chrome::HOST_DESKTOP_TYPE_ASH,
chrome::HELP_SOURCE_MENU);
}
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index 3e16b17..f31ed3a 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -82,7 +82,6 @@ void NavigateToSingletonTab(Browser* browser, const GURL& url) {
// is created.
void ShowHelpImpl(Browser* browser,
Profile* profile,
- HostDesktopType host_desktop_type,
HelpSource source) {
content::RecordAction(UserMetricsAction("ShowHelpTab"));
#if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD)
@@ -104,8 +103,7 @@ void ShowHelpImpl(Browser* browser,
default:
NOTREACHED() << "Unhandled help source" << source;
}
- AppLaunchParams params(profile, extension, CURRENT_TAB, host_desktop_type,
- app_launch_source);
+ AppLaunchParams params(profile, extension, CURRENT_TAB, app_launch_source);
OpenApplication(params);
#else
GURL url;
@@ -205,14 +203,11 @@ void ShowConflicts(Browser* browser) {
}
void ShowHelp(Browser* browser, HelpSource source) {
- ShowHelpImpl(
- browser, browser->profile(), browser->host_desktop_type(), source);
+ ShowHelpImpl(browser, browser->profile(), source);
}
-void ShowHelpForProfile(Profile* profile,
- HostDesktopType host_desktop_type,
- HelpSource source) {
- ShowHelpImpl(NULL, profile, host_desktop_type, source);
+void ShowHelpForProfile(Profile* profile, HelpSource source) {
+ ShowHelpImpl(NULL, profile, source);
}
void ShowPolicy(Browser* browser) {
diff --git a/chrome/browser/ui/chrome_pages.h b/chrome/browser/ui/chrome_pages.h
index e08f4cb..11a0237 100644
--- a/chrome/browser/ui/chrome_pages.h
+++ b/chrome/browser/ui/chrome_pages.h
@@ -10,7 +10,6 @@
#include <string>
#include "build/build_config.h"
-#include "chrome/browser/ui/host_desktop.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "url/gurl.h"
@@ -55,7 +54,6 @@ void ShowFeedbackPage(Browser* browser,
void ShowHelp(Browser* browser, HelpSource source);
void ShowHelpForProfile(Profile* profile,
- HostDesktopType host_desktop_type,
HelpSource source);
void ShowPolicy(Browser* browser);
void ShowSlow(Browser* browser);
diff --git a/chrome/browser/ui/extensions/app_launch_params.cc b/chrome/browser/ui/extensions/app_launch_params.cc
index 80dab73..f099ad5 100644
--- a/chrome/browser/ui/extensions/app_launch_params.cc
+++ b/chrome/browser/ui/extensions/app_launch_params.cc
@@ -22,7 +22,6 @@ 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),
@@ -31,32 +30,11 @@ 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),
diff --git a/chrome/browser/ui/extensions/app_launch_params.h b/chrome/browser/ui/extensions/app_launch_params.h
index 3b69479..7d34e71 100644
--- a/chrome/browser/ui/extensions/app_launch_params.h
+++ b/chrome/browser/ui/extensions/app_launch_params.h
@@ -29,21 +29,12 @@ struct AppLaunchParams {
WindowOpenDisposition disposition,
extensions::AppLaunchSource source);
- // Helper to create AppLaunchParams using extensions::GetLaunchContainer with
- // LAUNCH_TYPE_REGULAR to check for a user-configured container.
- AppLaunchParams(Profile* profile,
- const extensions::Extension* extension,
- WindowOpenDisposition disposition,
- extensions::AppLaunchSource source);
-
// Helper to create AppLaunchParams using event flags that allows user to
// override the user-configured container using modifier keys, falling back to
- // extensions::GetLaunchContainer() with no modifiers. |desktop_type|
- // indicates the desktop upon which to launch (Ash or Native).
+ // extensions::GetLaunchContainer() with no modifiers.
AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
WindowOpenDisposition disposition,
- chrome::HostDesktopType desktop_type,
extensions::AppLaunchSource source);
~AppLaunchParams();
@@ -60,9 +51,6 @@ struct AppLaunchParams {
// If container is TAB, this field controls how the tab is opened.
WindowOpenDisposition disposition;
- // The desktop type to launch on. Uses GetActiveDesktop() if unspecified.
- chrome::HostDesktopType desktop_type;
-
// If non-empty, use override_url in place of the application's launch url.
GURL override_url;
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index 8c7fa3f..5412a4b 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -56,9 +56,9 @@ using extensions::ExtensionRegistry;
namespace {
// Shows the app list for |desktop_type| and returns the app list's window.
-gfx::NativeWindow ShowAppListAndGetNativeWindow(
- chrome::HostDesktopType desktop_type) {
- AppListService* app_list_service = AppListService::Get(desktop_type);
+gfx::NativeWindow ShowAppListAndGetNativeWindow() {
+ AppListService* app_list_service =
+ AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE);
app_list_service->Show();
return app_list_service->GetAppListWindow();
}
@@ -383,8 +383,7 @@ void OpenApplicationWithReenablePrompt(const AppLaunchParams& params) {
base::Callback<gfx::NativeWindow(void)> dialog_parent_window_getter;
// TODO(pkotwicz): Figure out which window should be used as the parent for
// the "enable application" dialog in Athena.
- dialog_parent_window_getter =
- base::Bind(&ShowAppListAndGetNativeWindow, params.desktop_type);
+ dialog_parent_window_getter = base::Bind(&ShowAppListAndGetNativeWindow);
(new EnableViaDialogFlow(
service, profile, extension->id(), dialog_parent_window_getter,
base::Bind(base::IgnoreResult(OpenEnabledApplication), params)))->Run();
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index 6229f22..7be189b 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -334,7 +334,6 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile,
params.current_directory = cur_dir_;
// If we are being launched from the command line, default to native
// desktop.
- params.desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
::OpenApplicationWithReenablePrompt(params);
return true;
}
diff --git a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
index b2ff1d4..5a563ad 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
+++ b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
@@ -27,7 +27,3 @@ gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() {
GetImageSkiaNamed(GetAppListIconResourceId());
return *resource;
}
-
-void AppListControllerDelegateWin::FillLaunchParams(AppLaunchParams* params) {
- params->desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
-}
diff --git a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h
index 0b54d1b..80fefda 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h
+++ b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h
@@ -19,9 +19,6 @@ class AppListControllerDelegateWin : public AppListControllerDelegateViews {
gfx::ImageSkia GetWindowIcon() override;
private:
- // AppListcontrollerDelegateImpl:
- void FillLaunchParams(AppLaunchParams* params) override;
-
DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateWin);
};