Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2012 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 IOS_CHROME_APP_UIAPPLICATION_EXITSONSUSPEND_H_ | |
| 6 #define IOS_CHROME_APP_UIAPPLICATION_EXITSONSUSPEND_H_ | |
| 7 | |
| 8 #if !defined(NDEBUG) | |
|
sdefresne
2015/04/28 14:57:25
Why !defined(NDEBUG) instead of !defined(GOOGLE_CH
droger
2015/04/29 08:53:25
I don't know, I'd like to not change this as part
| |
| 9 | |
| 10 #import <UIKit/UIKit.h> | |
| 11 | |
| 12 // Key in the UserDefaults for toggling exit on suspend. | |
| 13 extern NSString* const kExitsOnSuspend; | |
| 14 | |
| 15 // WARNING: This is intended for non AppStore builds, since it's not allowed to | |
| 16 // quit an app programmatically. Internally we call exit(0). | |
| 17 @interface UIApplication (ExitsOnSuspend) | |
| 18 | |
| 19 // When the app goes in background, terminate the app when all background tasks | |
| 20 // have finished. Use this in -applicationDidEnterBackground:. | |
| 21 - (void)cr_terminateWhenDoneWithBackgroundTasks; | |
| 22 | |
| 23 // Cancel termination. Use this in -applicationWillEnterForeground:. | |
| 24 - (void)cr_cancelTermination; | |
| 25 | |
| 26 @end | |
| 27 | |
| 28 #endif // !defined(NDEBUG) | |
| 29 | |
| 30 #endif // IOS_CHROME_APP_UIAPPLICATION_EXITSONSUSPEND_H_ | |
| OLD | NEW |