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_BROWSER_LAUNCHER_H_ |
| 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_BROWSER_LAUNCHER_H_ |
| 7 |
| 8 #import "ios/chrome/browser/ui/main/browser_view_information.h" |
| 9 |
| 10 // Possible stages of the browser initialization. These states will be reached |
| 11 // in sequence, each stage is a requiremant for the following one. |
| 12 enum BrowserInitializationStageType { |
| 13 // This state is before any initialization in MainController. |
| 14 INITIALIZATION_STAGE_NONE = 0, |
| 15 // Initialization state after |didFinishLaunchingWithOptions|. |
| 16 INITIALIZATION_STAGE_BASIC, |
| 17 // Initialization state needed by background handlers. |
| 18 INITIALIZATION_STAGE_BACKGROUND, |
| 19 // Full initialization of the browser. |
| 20 INITIALIZATION_STAGE_FOREGROUND, |
| 21 BROWSER_INITIALIZATION_STAGE_TYPE_COUNT, |
| 22 }; |
| 23 |
| 24 // This protocol defines the startup method for the application. |
| 25 @protocol BrowserLauncher<NSObject> |
| 26 |
| 27 // Cached launchOptions from AppState's -didFinishLaunchingWithOptions. |
| 28 @property(nonatomic, retain) NSDictionary* launchOptions; |
| 29 |
| 30 // Highest initialization stage reached by the browser. |
| 31 @property(nonatomic, readonly) |
| 32 BrowserInitializationStageType browserInitializationStage; |
| 33 |
| 34 // Browser view information created during startup. |
| 35 @property(nonatomic, readonly) id<BrowserViewInformation> |
| 36 browserViewInformation; |
| 37 |
| 38 // Initializes the application up to |stage|. |
| 39 - (void)startUpBrowserToStage:(BrowserInitializationStageType)stage; |
| 40 |
| 41 @end |
| 42 |
| 43 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_BROWSER_LAUNCHER_H_ |
OLD | NEW |