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

Unified Diff: apps/app_shim/extension_app_shim_handler_mac.cc

Issue 403743002: [Mac] Hide all shims when Chrome is hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/extension_app_shim_handler_mac.h ('k') | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_shim/extension_app_shim_handler_mac.cc
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc
index 48f4eeeccd7dd27ce7b4de5eaa8795f6ddd31909..4ec7e1732fb83ed1a42ac8810568a03dc83fdfe1 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac.cc
@@ -292,6 +292,21 @@ bool ExtensionAppShimHandler::RequestUserAttentionForWindow(
}
}
+// static
+void ExtensionAppShimHandler::OnChromeWillHide() {
+ // Send OnAppHide to all the shims so that they go into the hidden state.
+ // This is necessary so that when the shim is next focused, it will know to
+ // unhide.
+ ExtensionAppShimHandler* handler = g_browser_process->platform_part()
tapted 2014/07/18 06:24:34 nit: WDYT about adding a GetHandler/GetInstance()
jackhou1 2014/07/21 01:11:27 Done.
+ ->app_shim_host_manager()
+ ->extension_app_shim_handler();
+ for (HostMap::iterator it = handler->hosts_.begin();
+ it != handler->hosts_.end();
+ ++it) {
+ it->second->OnAppHide();
+ }
+}
+
void ExtensionAppShimHandler::OnShimLaunch(
Host* host,
AppShimLaunchType launch_type,
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac.h ('k') | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698