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

Side by Side Diff: chrome/browser/ui/views/auto_keep_alive.h

Issue 1376063005: Cleanup: Pull some browser keep alive functions into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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/memory/scoped_ptr.h"
8 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
9 10
11 namespace browser_lifetime {
12 class ScopedKeepAlive;
13 }
14
10 // Class to scoped decrement keep alive count. 15 // Class to scoped decrement keep alive count.
11 class AutoKeepAlive { 16 class AutoKeepAlive {
12 public: 17 public:
13 explicit AutoKeepAlive(gfx::NativeWindow window); 18 explicit AutoKeepAlive(gfx::NativeWindow window);
14 ~AutoKeepAlive(); 19 ~AutoKeepAlive();
15 20
16 private: 21 private:
17 bool keep_alive_available_; 22 scoped_ptr<browser_lifetime::ScopedKeepAlive> keep_alive_;
18 23
19 DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive); 24 DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive);
20 }; 25 };
21 26
22 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ 27 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/app_list/linux/app_list_service_linux.cc ('k') | chrome/browser/ui/views/auto_keep_alive.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698