| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/web_view/shell/shell_app_delegate.h" | 5 #import "ios/web_view/shell/shell_app_delegate.h" |
| 6 | 6 |
| 7 #import <ChromeWebView/ChromeWebView.h> | 7 #import <ChromeWebView/ChromeWebView.h> |
| 8 | 8 |
| 9 #import "ios/web_view/shell/shell_view_controller.h" | 9 #import "ios/web_view/shell/shell_view_controller.h" |
| 10 | 10 |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | 11 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." | 12 #error "This file requires ARC support." |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 @implementation ShellAppDelegate | 15 @implementation ShellAppDelegate |
| 16 | 16 |
| 17 @synthesize window = _window; | 17 @synthesize window = _window; |
| 18 | 18 |
| 19 - (BOOL)application:(UIApplication*)application | 19 - (BOOL)application:(UIApplication*)application |
| 20 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { | 20 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { |
| 21 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | 21 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
| 22 self.window.backgroundColor = [UIColor whiteColor]; | 22 self.window.backgroundColor = [UIColor whiteColor]; |
| 23 | 23 |
| 24 [CWV configureWithUserAgentProductName:@"Dummy/1.0"]; | 24 [CWVWebViewConfiguration setUserAgentProductName:@"Dummy/1.0"]; |
| 25 | 25 |
| 26 [self.window makeKeyAndVisible]; | 26 [self.window makeKeyAndVisible]; |
| 27 | 27 |
| 28 ShellViewController* controller = [[ShellViewController alloc] init]; | 28 ShellViewController* controller = [[ShellViewController alloc] init]; |
| 29 self.window.rootViewController = controller; | 29 self.window.rootViewController = controller; |
| 30 | 30 |
| 31 return YES; | 31 return YES; |
| 32 } | 32 } |
| 33 | 33 |
| 34 - (void)applicationWillResignActive:(UIApplication*)application { | 34 - (void)applicationWillResignActive:(UIApplication*)application { |
| 35 } | 35 } |
| 36 | 36 |
| 37 - (void)applicationDidEnterBackground:(UIApplication*)application { | 37 - (void)applicationDidEnterBackground:(UIApplication*)application { |
| 38 } | 38 } |
| 39 | 39 |
| 40 - (void)applicationWillEnterForeground:(UIApplication*)application { | 40 - (void)applicationWillEnterForeground:(UIApplication*)application { |
| 41 } | 41 } |
| 42 | 42 |
| 43 - (void)applicationDidBecomeActive:(UIApplication*)application { | 43 - (void)applicationDidBecomeActive:(UIApplication*)application { |
| 44 } | 44 } |
| 45 | 45 |
| 46 - (void)applicationWillTerminate:(UIApplication*)application { | 46 - (void)applicationWillTerminate:(UIApplication*)application { |
| 47 } | 47 } |
| 48 | 48 |
| 49 @end | 49 @end |
| OLD | NEW |