Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: ios/web_view/shell/shell_app_delegate.m

Issue 2800433002: Remove CWVDelegate. (Closed)
Patch Set: Respond to comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web_view/shell/BUILD.gn ('k') | ios/web_view/shell/shell_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_delegate.h"
10 #import "ios/web_view/shell/shell_view_controller.h" 9 #import "ios/web_view/shell/shell_view_controller.h"
11 10
12 #if !defined(__has_feature) || !__has_feature(objc_arc) 11 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support." 12 #error "This file requires ARC support."
14 #endif 13 #endif
15 14
16 @interface ShellAppDelegate ()
17 @property(nonatomic, strong) ShellDelegate* delegate;
18 @end
19
20 @implementation ShellAppDelegate 15 @implementation ShellAppDelegate
21 16
22 @synthesize delegate = _delegate;
23 @synthesize window = _window; 17 @synthesize window = _window;
24 18
25 - (BOOL)application:(UIApplication*)application 19 - (BOOL)application:(UIApplication*)application
26 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { 20 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
27 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 21 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
28 self.window.backgroundColor = [UIColor whiteColor]; 22 self.window.backgroundColor = [UIColor whiteColor];
29 23
30 self.delegate = [[ShellDelegate alloc] init]; 24 [CWV configureWithUserAgentProductName:@"Dummy/1.0"];
31 [CWV configureWithDelegate:_delegate];
32 25
33 [self.window makeKeyAndVisible]; 26 [self.window makeKeyAndVisible];
34 27
35 ShellViewController* controller = [[ShellViewController alloc] init]; 28 ShellViewController* controller = [[ShellViewController alloc] init];
36 self.window.rootViewController = controller; 29 self.window.rootViewController = controller;
37 30
38 return YES; 31 return YES;
39 } 32 }
40 33
41 - (void)applicationWillResignActive:(UIApplication*)application { 34 - (void)applicationWillResignActive:(UIApplication*)application {
42 } 35 }
43 36
44 - (void)applicationDidEnterBackground:(UIApplication*)application { 37 - (void)applicationDidEnterBackground:(UIApplication*)application {
45 } 38 }
46 39
47 - (void)applicationWillEnterForeground:(UIApplication*)application { 40 - (void)applicationWillEnterForeground:(UIApplication*)application {
48 } 41 }
49 42
50 - (void)applicationDidBecomeActive:(UIApplication*)application { 43 - (void)applicationDidBecomeActive:(UIApplication*)application {
51 } 44 }
52 45
53 - (void)applicationWillTerminate:(UIApplication*)application { 46 - (void)applicationWillTerminate:(UIApplication*)application {
54 [CWV shutDown];
55 } 47 }
56 48
57 @end 49 @end
OLDNEW
« no previous file with comments | « ios/web_view/shell/BUILD.gn ('k') | ios/web_view/shell/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698