Index: chrome/app/chrome_main_app_mode_mac.mm |
diff --git a/chrome/app/chrome_main_app_mode_mac.mm b/chrome/app/chrome_main_app_mode_mac.mm |
index 1de3fe5899ec42689fbbc4614cc5863a9ea4f127..37781ca14e058dcb16857cbe528154d13ec2db9e 100644 |
--- a/chrome/app/chrome_main_app_mode_mac.mm |
+++ b/chrome/app/chrome_main_app_mode_mac.mm |
@@ -66,8 +66,7 @@ class AppShimController : public IPC::Listener { |
DISALLOW_COPY_AND_ASSIGN(AppShimController); |
}; |
-AppShimController::AppShimController() : channel_(NULL) { |
-} |
+AppShimController::AppShimController() : channel_(NULL) {} |
void AppShimController::Init() { |
DCHECK(g_io_thread); |
@@ -88,7 +87,9 @@ void AppShimController::Init() { |
this, g_io_thread->message_loop_proxy()); |
channel_->Send(new AppShimHostMsg_LaunchApp( |
- g_info->profile_dir.value(), g_info->app_mode_id)); |
+ g_info->profile_dir, g_info->app_mode_id, |
+ CommandLine::ForCurrentProcess()->HasSwitch(app_mode::kNoLaunchApp) ? |
+ apps::REGISTER_WITHOUT_LAUNCH : apps::LAUNCH_NOW)); |
} |
bool AppShimController::OnMessageReceived(const IPC::Message& message) { |
@@ -102,7 +103,7 @@ bool AppShimController::OnMessageReceived(const IPC::Message& message) { |
} |
void AppShimController::OnChannelError() { |
- LOG(ERROR) << "App shim channel error."; |
+ DLOG(ERROR) << "App shim channel error."; |
tapted
2013/05/30 03:25:06
Let's just remove this. It's usually a lie, since
jackhou1
2013/05/30 05:10:05
Done.
|
Quit(); |
} |
@@ -111,6 +112,7 @@ void AppShimController::OnLaunchAppDone(bool success) { |
Quit(); |
return; |
} |
+ |
[[[NSWorkspace sharedWorkspace] notificationCenter] |
addObserverForName:NSWorkspaceDidActivateApplicationNotification |
object:nil |
@@ -259,6 +261,8 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info); |
} // extern "C" |
int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) { |
+ CommandLine::Init(info->argc, info->argv); |
+ |
base::mac::ScopedNSAutoreleasePool scoped_pool; |
base::AtExitManager exit_manager; |
chrome::RegisterPathProvider(); |