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

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

Issue 557833007: Remove Increment/DecrementKeepAliveCount from AppsClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 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: chrome/browser/ui/apps/chrome_app_window_client.cc
diff --git a/chrome/browser/ui/apps/chrome_app_window_client.cc b/chrome/browser/ui/apps/chrome_app_window_client.cc
index 9dd1f161446764ec0358e1c41ca68d19db2c5b81..3b4120e351ea008d184c3b84c0a943b839a74da6 100644
--- a/chrome/browser/ui/apps/chrome_app_window_client.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_client.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "base/memory/singleton.h"
+#include "chrome/browser/apps/scoped_keep_alive.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -15,7 +16,6 @@
// TODO(jamescook): We probably shouldn't compile this class at all on Android.
// See http://crbug.com/343612
#if !defined(OS_ANDROID)
-#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/ui/apps/chrome_app_delegate.h"
#endif
@@ -45,7 +45,10 @@ extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow(
#if defined(OS_ANDROID)
return NULL;
#else
- return new extensions::AppWindow(context, new ChromeAppDelegate, extension);
+ return new extensions::AppWindow(
+ context,
+ new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)),
+ extension);
#endif
}
@@ -59,18 +62,6 @@ extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindow(
#endif
}
-void ChromeAppWindowClient::IncrementKeepAliveCount() {
-#if !defined(OS_ANDROID)
- chrome::IncrementKeepAliveCount();
-#endif
-}
-
-void ChromeAppWindowClient::DecrementKeepAliveCount() {
-#if !defined(OS_ANDROID)
- chrome::DecrementKeepAliveCount();
-#endif
-}
-
void ChromeAppWindowClient::OpenDevToolsWindow(
content::WebContents* web_contents,
const base::Closure& callback) {

Powered by Google App Engine
This is Rietveld 408576698