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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_controller_helper.cc

Issue 2894743002: Make launching apps from shelf more intuitive (Closed)
Patch Set: This patch set has many platform related issue Created 3 years, 7 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/ash/launcher/launcher_controller_helper.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
index b5771d00aa266d4b43d9a55710a52b7ce18417f0..e4cd06396034cb5ca0b5a30604f9c5480e701dd3 100644
--- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
@@ -168,14 +168,14 @@ bool LauncherControllerHelper::IsValidIDForCurrentUser(
void LauncherControllerHelper::LaunchApp(const ash::ShelfID& id,
ash::ShelfLaunchSource source,
- int event_flags) {
+ int event_flags,
+ const aura::Window* root_window) {
const std::string& app_id = id.app_id;
const ArcAppListPrefs* arc_prefs = GetArcAppListPrefs();
if (arc_prefs && arc_prefs->IsRegistered(app_id)) {
arc::LaunchApp(profile_, app_id, event_flags);
return;
}
-
// |extension| could be null when it is being unloaded for updating.
const extensions::Extension* extension = GetExtensionByID(profile_, app_id);
if (!extension)
@@ -194,7 +194,8 @@ void LauncherControllerHelper::LaunchApp(const ash::ShelfID& id,
// The app will be created for the currently active profile.
AppLaunchParams params = CreateAppLaunchParamsWithEventFlags(
- profile_, extension, event_flags, extensions::SOURCE_APP_LAUNCHER);
+ profile_, extension, event_flags, extensions::SOURCE_APP_LAUNCHER,
+ root_window);
if (source != ash::LAUNCH_FROM_UNKNOWN &&
app_id == extensions::kWebStoreAppId) {
// Get the corresponding source string.
@@ -206,7 +207,6 @@ void LauncherControllerHelper::LaunchApp(const ash::ShelfID& id,
extension_url, extension_urls::kWebstoreSourceField, source_value);
}
params.launch_id = id.launch_id;
-
OpenApplication(params);
}
@@ -216,7 +216,7 @@ ArcAppListPrefs* LauncherControllerHelper::GetArcAppListPrefs() const {
void LauncherControllerHelper::ExtensionEnableFlowFinished() {
LaunchApp(ash::ShelfID(extension_enable_flow_->extension_id()),
- ash::LAUNCH_FROM_UNKNOWN, ui::EF_NONE);
+ ash::LAUNCH_FROM_UNKNOWN, ui::EF_NONE, NULL);
stevenjb 2017/05/22 17:55:29 nullptr
extension_enable_flow_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698