| 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;
|
|
|