OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_APPLICATION_DELEGATE_BACKGROUND_ACTIVITY_H_ |
| 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_BACKGROUND_ACTIVITY_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 @protocol BrowserLauncher; |
| 11 @class MetricsMediator; |
| 12 |
| 13 // Handles the data-related methods of the ApplicationDelegate. This class has |
| 14 // only class methods and should not be instantiated. |
| 15 @interface BackgroundActivity : NSObject |
| 16 |
| 17 // Class methods only. |
| 18 - (instancetype)init NS_UNAVAILABLE; |
| 19 |
| 20 // Handler for the application delegate |performFetchWithCompletionHandler| |
| 21 // message. Sends the next breakpad report if available and the user permits it. |
| 22 + (void)application:(UIApplication*)application |
| 23 performFetchWithCompletionHandler: |
| 24 (void (^)(UIBackgroundFetchResult))completionHandler |
| 25 metricsMediator:(MetricsMediator*)metricsMediator |
| 26 browserLauncher:(id<BrowserLauncher>)browserLauncher; |
| 27 |
| 28 // Handles Events for Background. |
| 29 + (void)handleEventsForBackgroundURLSession:(NSString*)identifier |
| 30 completionHandler:(void (^)(void))completionHandler |
| 31 browserLauncher: |
| 32 (id<BrowserLauncher>)browserLauncher; |
| 33 |
| 34 // Once the application is in foreground, reset last fetch in background time in |
| 35 // NSUserDefaults. |
| 36 + (void)foregroundStarted; |
| 37 @end |
| 38 |
| 39 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_BACKGROUND_ACTIVITY_H_ |
OLD | NEW |