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

Unified Diff: apps/app_shim/app_shim_host_mac.cc

Issue 14579005: Close all windows when app shim quits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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: apps/app_shim/app_shim_host_mac.cc
diff --git a/apps/app_shim/app_shim_host_mac.cc b/apps/app_shim/app_shim_host_mac.cc
index ad63e93038ff20ad397037c5dbe7e262728ef63a..07c9903b6f2f320d05f3323b37d2aa9b01bb3d05 100644
--- a/apps/app_shim/app_shim_host_mac.cc
+++ b/apps/app_shim/app_shim_host_mac.cc
@@ -47,6 +47,7 @@ bool AppShimHost::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(AppShimHost, message)
IPC_MESSAGE_HANDLER(AppShimHostMsg_LaunchApp, OnLaunchApp)
IPC_MESSAGE_HANDLER(AppShimHostMsg_FocusApp, OnFocus)
+ IPC_MESSAGE_HANDLER(AppShimHostMsg_QuitApp, OnQuit)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -85,6 +86,13 @@ void AppShimHost::OnFocus() {
handler->OnShimFocus(this);
}
+void AppShimHost::OnQuit() {
+ DCHECK(CalledOnValidThread());
+ apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_);
+ if (handler)
+ handler->OnShimQuit(this);
+}
+
Profile* AppShimHost::FetchProfileForDirectory(const std::string& profile_dir) {
ProfileManager* profileManager = g_browser_process->profile_manager();
// Even though the name of this function is "unsafe", there's no security

Powered by Google App Engine
This is Rietveld 408576698