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

Unified Diff: chrome/app/chrome_main_app_mode_mac.mm

Issue 14514003: Make OSX App Launcher Launchable from the Dock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase off cl14603002 Created 7 years, 8 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
« no previous file with comments | « apps/app_shim/app_shim_messages.h ('k') | chrome/app/chromium_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
}
« no previous file with comments | « apps/app_shim/app_shim_messages.h ('k') | chrome/app/chromium_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698