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

Side by Side 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: Use singleton instead of browserprocess 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
7 7
8 #include "base/macros.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 // Class to scoped decrement keep alive count. 11 class ScopedKeepAlive;
12 class AutoKeepAlive {
13 public:
14 explicit AutoKeepAlive(gfx::NativeWindow window);
15 ~AutoKeepAlive();
16 12
17 private: 13 // Returns a keep alive object for the caller to take ownership of.
18 bool keep_alive_available_; 14 // On ASH environments, will return a null pointer.
Bernhard Bauer 2016/02/19 17:39:28 Nit: "Ash" (only the first letter is capitalized).
dgn 2016/02/19 18:04:28 Done.
19 15 scoped_ptr<ScopedKeepAlive> AutoKeepAlive(gfx::NativeWindow window);
20 DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive);
21 };
22 16
23 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ 17 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698