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

Unified Diff: chrome/app/chrome_main_app_mode_mac.mm

Issue 14579006: Start app shim when app launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment 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: 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 e46461227c37b8cd2da5794f68fbc7cf4b6b3d14..8038788fb351501dcbb57b565d61a1e11a67d47f 100644
--- a/chrome/app/chrome_main_app_mode_mac.mm
+++ b/chrome/app/chrome_main_app_mode_mac.mm
@@ -86,8 +86,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);
@@ -108,7 +107,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::APP_SHIM_LAUNCH_REGISTER_ONLY : apps::APP_SHIM_LAUNCH_NORMAL));
nsapp_delegate_.reset([[AppShimDelegate alloc] initWithController:this]);
DCHECK(![NSApp delegate]);
@@ -130,7 +131,6 @@ bool AppShimController::OnMessageReceived(const IPC::Message& message) {
}
void AppShimController::OnChannelError() {
- LOG(ERROR) << "App shim channel error.";
Close();
}
@@ -139,6 +139,7 @@ void AppShimController::OnLaunchAppDone(bool success) {
Close();
return;
}
+
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserverForName:NSWorkspaceDidActivateApplicationNotification
object:nil
@@ -319,6 +320,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();
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac_unittest.cc ('k') | chrome/browser/ui/app_list/app_list_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698