OLD | NEW |
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 "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
9 | 10 |
10 // Class to scoped decrement keep alive count. | 11 // Class to scoped decrement keep alive count. |
11 class AutoKeepAlive { | 12 class AutoKeepAlive { |
12 public: | 13 public: |
13 explicit AutoKeepAlive(gfx::NativeWindow window); | 14 explicit AutoKeepAlive(gfx::NativeWindow window); |
14 ~AutoKeepAlive(); | 15 ~AutoKeepAlive(); |
15 | 16 |
16 private: | 17 private: |
17 bool keep_alive_available_; | 18 bool keep_alive_available_; |
18 | 19 |
19 DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive); | 20 DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive); |
20 }; | 21 }; |
21 | 22 |
22 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ | 23 #endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_ |
OLD | NEW |