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

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

Issue 2894743002: Make launching apps from shelf more intuitive (Closed)
Patch Set: Affected by new revision, gclient sync and re-upload. 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_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 8230d1e9152d34673f954fbea662780fae5bb189..3639dfd2ec4686a40e89dc7cfb0a99eb4389debc 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -8,6 +8,7 @@
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_model.h"
+#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/strings/grit/ash_strings.h"
@@ -107,7 +108,11 @@ bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const {
void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
switch (static_cast<MenuItem>(command_id)) {
case MENU_OPEN_NEW:
- controller_->Launch(item_.id, ui::EF_NONE);
+ controller_->LaunchApp(item_.id, ash::LAUNCH_FROM_UNKNOWN, ui::EF_NONE,
+ display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(
+ shelf_->shelf_widget()->GetNativeWindow())
+ .id());
break;
case MENU_CLOSE:
if (item_.type == ash::TYPE_DIALOG) {

Powered by Google App Engine
This is Rietveld 408576698