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

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

Issue 2791403005: Remove CWV class and move setting User Agent to CWVWebViewConfiguration. (Closed)
Patch Set: 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
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_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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698