Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_LIFETIME_BROWSER_KEEP_ALIVE_H_ | |
| 6 #define CHROME_BROWSER_LIFETIME_BROWSER_KEEP_ALIVE_H_ | |
| 7 | |
| 8 namespace browser_lifetime { | |
| 9 | |
| 10 // Tells the BrowserList to keep the application alive after the last Browser | |
| 11 // closes. This is implemented as a count, so callers should pair their calls | |
| 12 // to IncrementKeepAliveCount() with matching calls to DecrementKeepAliveCount() | |
| 13 // when they no | |
| 14 // longer need to keep the application running. | |
| 15 void IncrementKeepAliveCount(); | |
|
sky
2015/10/02 15:44:27
I like factoring this code out into it's file. But
| |
| 16 | |
| 17 // Stops keeping the application alive after the last Browser is closed. | |
| 18 // Should match a previous call to IncrementKeepAliveCount(). | |
| 19 void DecrementKeepAliveCount(); | |
| 20 | |
| 21 // Returns true if application will continue running after the last Browser | |
| 22 // closes. | |
| 23 bool WillKeepAlive(); | |
| 24 | |
| 25 // Disable browser shutdown for unit tests. | |
| 26 void DisableShutdownForTesting(bool disable_shutdown_for_testing); | |
| 27 | |
| 28 } // namespace browser_lifetime | |
| 29 | |
| 30 #endif // CHROME_BROWSER_LIFETIME_BROWSER_KEEP_ALIVE_H_ | |
| 31 | |
| OLD | NEW |