| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/web_view/shell/shell_app_delegate.h" | |
| 6 | |
| 7 #import "ios/web_view/public/criwv.h" | |
| 8 #import "ios/web_view/shell/shell_delegate.h" | |
| 9 #import "ios/web_view/shell/shell_view_controller.h" | |
| 10 | |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 12 #error "This file requires ARC support." | |
| 13 #endif | |
| 14 | |
| 15 @interface ShellAppDelegate () | |
| 16 @property (nonatomic, strong) ShellDelegate* delegate; | |
| 17 @end | |
| 18 | |
| 19 @implementation ShellAppDelegate | |
| 20 | |
| 21 @synthesize delegate = _delegate; | |
| 22 @synthesize window = _window; | |
| 23 | |
| 24 - (BOOL)application:(UIApplication*)application | |
| 25 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { | |
| 26 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
| 27 self.window.backgroundColor = [UIColor whiteColor]; | |
| 28 | |
| 29 self.delegate = [[ShellDelegate alloc] init]; | |
| 30 [CRIWV configureWithDelegate:_delegate]; | |
| 31 | |
| 32 [self.window makeKeyAndVisible]; | |
| 33 | |
| 34 ShellViewController* controller = [[ShellViewController alloc] init]; | |
| 35 self.window.rootViewController = controller; | |
| 36 | |
| 37 return YES; | |
| 38 } | |
| 39 | |
| 40 - (void)applicationWillResignActive:(UIApplication*)application { | |
| 41 } | |
| 42 | |
| 43 - (void)applicationDidEnterBackground:(UIApplication*)application { | |
| 44 } | |
| 45 | |
| 46 - (void)applicationWillEnterForeground:(UIApplication*)application { | |
| 47 } | |
| 48 | |
| 49 - (void)applicationDidBecomeActive:(UIApplication*)application { | |
| 50 } | |
| 51 | |
| 52 - (void)applicationWillTerminate:(UIApplication*)application { | |
| 53 [CRIWV shutDown]; | |
| 54 } | |
| 55 | |
| 56 @end | |
| OLD | NEW |