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

Unified Diff: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.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/app_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
index f1bf9036b90887e6e41ce79cb3189479deff466e..1019a95e13f2ade812560d3aa90bb88bd03fdd86 100644
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
@@ -8,6 +8,8 @@
#include <utility>
+#include "ash/root_window_controller.h"
+#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/extensions/launch_util.h"
@@ -114,10 +116,15 @@ void AppShortcutLauncherItemController::ItemSelected(
return;
}
+ aura::Window* root_window =
+ ash::Shell::Get()
+ ->GetRootWindowControllerWithDisplayId(display_id)
+ ->GetRootWindow();
+
// Launching some items replaces this item controller instance, which
// destroys its ShelfID string pair; making copies avoid crashes.
- ChromeLauncherController::instance()->LaunchApp(ash::ShelfID(shelf_id()),
- source, ui::EF_NONE);
+ ChromeLauncherController::instance()->LaunchApp(
+ ash::ShelfID(shelf_id()), source, ui::EF_NONE, root_window);
std::move(callback).Run(ash::SHELF_ACTION_NEW_WINDOW_CREATED,
base::nullopt);
return;

Powered by Google App Engine
This is Rietveld 408576698