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

Unified Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 875273003: Hidden windows should not keep Chrome alive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « chrome/browser/ui/apps/chrome_app_delegate.h ('k') | extensions/browser/app_window/app_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/chrome_app_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index 36a96d221c074765a5b3e38ad80c71a43b74ebb0..3aa791ff7b6a5092240014a0d5715364fbaf2ade 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -304,6 +304,13 @@ void ChromeAppDelegate::SetTerminatingCallback(const base::Closure& callback) {
terminating_callback_ = callback;
}
+void ChromeAppDelegate::OnHide() {
+ keep_alive_.reset();
benwells 2015/01/28 02:42:10 If an app window is created hidden does it get OnH
jackhou1 2015/02/03 06:05:13 Yup, AppWindow::Init calls Hide() if the window is
+}
+void ChromeAppDelegate::OnShow() {
benwells 2015/01/28 02:42:10 Nit: Blank line above.
jackhou1 2015/02/03 06:05:13 Done.
+ keep_alive_.reset(new ScopedKeepAlive);
+}
+
void ChromeAppDelegate::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_delegate.h ('k') | extensions/browser/app_window/app_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698