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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_controller_helper.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
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_controller_helper.h ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8f4427e6f1478ac16161881a40cd1950d924d9bd 100644
--- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
@@ -31,6 +31,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "net/base/url_util.h"
+#include "ui/display/types/display_constants.h"
#include "ui/events/event_constants.h"
namespace {
@@ -168,7 +169,8 @@ bool LauncherControllerHelper::IsValidIDForCurrentUser(
void LauncherControllerHelper::LaunchApp(const ash::ShelfID& id,
ash::ShelfLaunchSource source,
- int event_flags) {
+ int event_flags,
+ int64_t display_id) {
const std::string& app_id = id.app_id;
const ArcAppListPrefs* arc_prefs = GetArcAppListPrefs();
if (arc_prefs && arc_prefs->IsRegistered(app_id)) {
@@ -194,7 +196,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,
+ display_id);
if (source != ash::LAUNCH_FROM_UNKNOWN &&
app_id == extensions::kWebStoreAppId) {
// Get the corresponding source string.
@@ -216,7 +219,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, display::kInvalidDisplayId);
extension_enable_flow_.reset();
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_controller_helper.h ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698