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

Unified Diff: chrome/browser/ui/views/auto_keep_alive.h

Issue 1708343002: Add ScopedKeepAlive to c/b/lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/views/auto_keep_alive.h
diff --git a/chrome/browser/ui/views/auto_keep_alive.h b/chrome/browser/ui/views/auto_keep_alive.h
index a9eee78e4b27245f60f34ef79524d4a395f4c521..328b7cae9a08e735187aa43ec96166fcc018fc49 100644
--- a/chrome/browser/ui/views/auto_keep_alive.h
+++ b/chrome/browser/ui/views/auto_keep_alive.h
@@ -5,19 +5,13 @@
#ifndef CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
#define CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
-#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/gfx/native_widget_types.h"
-// Class to scoped decrement keep alive count.
-class AutoKeepAlive {
- public:
- explicit AutoKeepAlive(gfx::NativeWindow window);
- ~AutoKeepAlive();
+class ScopedKeepAlive;
- private:
- bool keep_alive_available_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive);
-};
+// Returns a keep alive object for the caller to take ownership of.
+// On Ash environments, will return a null pointer.
+scoped_ptr<ScopedKeepAlive> AutoKeepAlive(gfx::NativeWindow window);
#endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_

Powered by Google App Engine
This is Rietveld 408576698