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

Unified Diff: apps/launcher.cc

Issue 2523053004: Enhance chrome.app.window API for shelf integration with restore support (Closed)
Patch Set: Review v5 Created 4 years 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 | « apps/launcher.h ('k') | chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/launcher.cc
diff --git a/apps/launcher.cc b/apps/launcher.cc
index 1ac5aef27947de679163f78d81d4f6998fe81ea3..01261f452b015944428e37db64302e38b8fde972 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -363,6 +363,19 @@ void LaunchPlatformAppWithCommandLine(Profile* profile,
const base::FilePath& current_directory,
extensions::AppLaunchSource source,
PlayStoreStatus play_store_status) {
+ LaunchPlatformAppWithCommandLineAndLaunchId(profile, app, "", command_line,
+ current_directory, source,
+ play_store_status);
+}
+
+void LaunchPlatformAppWithCommandLineAndLaunchId(
+ Profile* profile,
+ const extensions::Extension* app,
+ const std::string& launch_id,
+ const base::CommandLine& command_line,
+ const base::FilePath& current_directory,
+ extensions::AppLaunchSource source,
+ PlayStoreStatus play_store_status) {
// An app with "kiosk_only" should not be installed and launched
// outside of ChromeOS kiosk mode in the first place. This is a defensive
// check in case this scenario does occur.
@@ -374,7 +387,7 @@ void LaunchPlatformAppWithCommandLine(Profile* profile,
#endif
if (!in_kiosk_mode) {
LOG(ERROR) << "App with 'kiosk_only' attribute must be run in "
- << " ChromeOS kiosk mode.";
+ << " ChromeOS kiosk mode.";
NOTREACHED();
return;
}
@@ -397,6 +410,8 @@ void LaunchPlatformAppWithCommandLine(Profile* profile,
base::MakeUnique<app_runtime::LaunchData>();
if (play_store_status != PlayStoreStatus::PLAY_STORE_STATUS_UNKNOWN)
launch_data->play_store_status = play_store_status;
+ if (!launch_id.empty())
+ launch_data->id.reset(new std::string(launch_id));
AppRuntimeEventRouter::DispatchOnLaunchedEvent(profile, app, source,
std::move(launch_data));
return;
« no previous file with comments | « apps/launcher.h ('k') | chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698