| 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 ee7793cafa6e22c63b4e9cc77ce07bc703675161..e7b02ba7fcb3350c9434773157d7d9c4d9c2a22d 100644
|
| --- a/chrome/app/chrome_main_app_mode_mac.mm
|
| +++ b/chrome/app/chrome_main_app_mode_mac.mm
|
| @@ -54,6 +54,9 @@ class AppShimController : public IPC::Listener {
|
| // shim process should die.
|
| void OnLaunchAppDone(bool success);
|
|
|
| + // Called when the Chrome process observes the app list dismissal.
|
| + void OnAppListDismissed();
|
| +
|
| // Called when the app is activated, either by the user clicking on it in the
|
| // dock or by Cmd+Tabbing to it.
|
| void OnDidActivateApplication();
|
| @@ -87,6 +90,12 @@ void AppShimController::Init() {
|
| channel_ = new IPC::ChannelProxy(handle, IPC::Channel::MODE_NAMED_CLIENT,
|
| this, g_io_thread->message_loop_proxy());
|
|
|
| + // Check if this ia a shim for showing the app list.
|
| + if (g_info->app_mode_id == app_mode::kAppListModeId) {
|
| + channel_->Send(new AppShimHostMsg_LaunchAppList());
|
| + return;
|
| + }
|
| +
|
| channel_->Send(new AppShimHostMsg_LaunchApp(
|
| g_info->profile_dir.value(), g_info->app_mode_id));
|
| }
|
| @@ -95,6 +104,7 @@ bool AppShimController::OnMessageReceived(const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(AppShimController, message)
|
| IPC_MESSAGE_HANDLER(AppShimMsg_LaunchApp_Done, OnLaunchAppDone)
|
| + IPC_MESSAGE_HANDLER(AppShimMsg_AppListDismissed, OnAppListDismissed)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -123,6 +133,10 @@ void AppShimController::OnLaunchAppDone(bool success) {
|
| }];
|
| }
|
|
|
| +void AppShimController::OnAppListDismissed() {
|
| + Quit();
|
| +}
|
| +
|
| void AppShimController::Quit() {
|
| [NSApp terminate:nil];
|
| }
|
|
|