| 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 "base/mac/scoped_nsobject.h" |
| 8 #import "ios/web_view/public/criwv.h" |
| 9 #import "ios/web_view/shell/shell_delegate.h" |
| 10 #import "ios/web_view/shell/shell_view_controller.h" |
| 11 |
| 12 @interface ShellAppDelegate () { |
| 13 base::scoped_nsobject<ShellDelegate> _delegate; |
| 14 } |
| 15 @end |
| 16 |
| 17 @implementation ShellAppDelegate |
| 18 |
| 19 @synthesize window = _window; |
| 20 |
| 21 - (BOOL)application:(UIApplication*)application |
| 22 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { |
| 23 _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
| 24 self.window.backgroundColor = [UIColor whiteColor]; |
| 25 |
| 26 _delegate.reset([[ShellDelegate alloc] init]); |
| 27 [CRIWV configureWithDelegate:_delegate]; |
| 28 |
| 29 base::scoped_nsobject<ShellViewController> controller( |
| 30 [[ShellViewController alloc] init]); |
| 31 self.window.rootViewController = controller; |
| 32 [self.window makeKeyAndVisible]; |
| 33 return YES; |
| 34 } |
| 35 |
| 36 - (void)applicationWillResignActive:(UIApplication*)application { |
| 37 } |
| 38 |
| 39 - (void)applicationDidEnterBackground:(UIApplication*)application { |
| 40 } |
| 41 |
| 42 - (void)applicationWillEnterForeground:(UIApplication*)application { |
| 43 } |
| 44 |
| 45 - (void)applicationDidBecomeActive:(UIApplication*)application { |
| 46 } |
| 47 |
| 48 - (void)applicationWillTerminate:(UIApplication*)application { |
| 49 [CRIWV shutDown]; |
| 50 } |
| 51 |
| 52 @end |
| OLD | NEW |