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

Unified Diff: apps/app_shim/app_shim_host_mac.cc

Issue 14579006: Start app shim when app launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 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: apps/app_shim/app_shim_host_mac.cc
diff --git a/apps/app_shim/app_shim_host_mac.cc b/apps/app_shim/app_shim_host_mac.cc
index ad63e93038ff20ad397037c5dbe7e262728ef63a..a7e3ead3ba616bf9373a4c23f6b276458594a912 100644
--- a/apps/app_shim/app_shim_host_mac.cc
+++ b/apps/app_shim/app_shim_host_mac.cc
@@ -62,7 +62,9 @@ bool AppShimHost::Send(IPC::Message* message) {
return channel_->Send(message);
}
-void AppShimHost::OnLaunchApp(std::string profile_dir, std::string app_id) {
+void AppShimHost::OnLaunchApp(std::string profile_dir,
+ std::string app_id,
+ bool launch_now) {
DCHECK(CalledOnValidThread());
DCHECK(!profile_);
if (profile_) {
@@ -71,10 +73,15 @@ void AppShimHost::OnLaunchApp(std::string profile_dir, std::string app_id) {
return;
}
- profile_ = FetchProfileForDirectory(profile_dir);
+ if (!(profile_ = FetchProfileForDirectory(profile_dir))) {
+ Send(new AppShimMsg_LaunchApp_Done(false));
+ return;
+ }
+
app_id_ = app_id;
+
apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_);
- bool success = handler && handler->OnShimLaunch(this);
+ bool success = handler && handler->OnShimLaunch(this, launch_now);
Send(new AppShimMsg_LaunchApp_Done(success));
}

Powered by Google App Engine
This is Rietveld 408576698