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

Unified Diff: apps/app_shim/chrome_main_app_mode_mac.mm

Issue 23514021: Add Hide to app menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Save original key equivalent. Created 7 years, 3 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/chrome_main_app_mode_mac.mm
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index 3ca7c3fa8a31359a747b17c17431019375aef8f6..09d7ab76a4c3ece189bbbefdb5f8ab2ef9f21178 100644
--- a/apps/app_shim/chrome_main_app_mode_mac.mm
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm
@@ -99,6 +99,9 @@ class AppShimController : public IPC::Listener {
// shim process should die.
void OnLaunchAppDone(apps::AppShimLaunchResult result);
+ // Hide this app.
+ void OnHide();
+
// Requests user attention.
void OnRequestUserAttention();
@@ -191,6 +194,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_Hide, OnHide)
IPC_MESSAGE_HANDLER(AppShimMsg_RequestUserAttention, OnRequestUserAttention)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -211,6 +215,10 @@ void AppShimController::OnLaunchAppDone(apps::AppShimLaunchResult result) {
launch_app_done_ = true;
}
+void AppShimController::OnHide() {
+ [NSApp hide:nil];
+}
+
void AppShimController::OnRequestUserAttention() {
[NSApp requestUserAttention:NSInformationalRequest];
}
« no previous file with comments | « apps/app_shim/app_shim_quit_interactive_uitest_mac.mm ('k') | apps/app_shim/extension_app_shim_handler_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698