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

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: Rebase. 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/public/cwv_web_view.h ('k') | ios/web_view/shell/shell_view_controller.m » ('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>
8
9 #import "ios/web_view/shell/shell_view_controller.h" 7 #import "ios/web_view/shell/shell_view_controller.h"
10 8
11 #if !defined(__has_feature) || !__has_feature(objc_arc) 9 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support." 10 #error "This file requires ARC support."
13 #endif 11 #endif
14 12
15 @implementation ShellAppDelegate 13 @implementation ShellAppDelegate
16 14
17 @synthesize window = _window; 15 @synthesize window = _window;
18 16
19 - (BOOL)application:(UIApplication*)application 17 - (BOOL)application:(UIApplication*)application
20 willFinishLaunchingWithOptions:(NSDictionary*)launchOptions { 18 willFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
21 // Note that initialization of the window and the root view controller must be 19 // Note that initialization of the window and the root view controller must be
22 // done here, not in -application:didFinishLaunchingWithOptions: when state 20 // done here, not in -application:didFinishLaunchingWithOptions: when state
23 // restoration is supported. 21 // restoration is supported.
24 22
25 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 23 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
26 self.window.backgroundColor = [UIColor whiteColor]; 24 self.window.backgroundColor = [UIColor whiteColor];
27 25
28 [CWV configureWithUserAgentProductName:@"Dummy/1.0"];
29
30 ShellViewController* controller = [[ShellViewController alloc] init]; 26 ShellViewController* controller = [[ShellViewController alloc] init];
31 // Gives a restoration identifier so that state restoration works. 27 // Gives a restoration identifier so that state restoration works.
32 controller.restorationIdentifier = @"rootViewController"; 28 controller.restorationIdentifier = @"rootViewController";
33 self.window.rootViewController = controller; 29 self.window.rootViewController = controller;
34 30
35 return YES; 31 return YES;
36 } 32 }
37 33
38 - (BOOL)application:(UIApplication*)application 34 - (BOOL)application:(UIApplication*)application
39 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { 35 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
(...skipping 21 matching lines...) Expand all
61 return YES; 57 return YES;
62 } 58 }
63 59
64 - (BOOL)application:(UIApplication*)application 60 - (BOOL)application:(UIApplication*)application
65 shouldRestoreApplicationState:(NSCoder*)coder { 61 shouldRestoreApplicationState:(NSCoder*)coder {
66 // TODO(crbug.com/710329): Make this value configurable in the settings. 62 // TODO(crbug.com/710329): Make this value configurable in the settings.
67 return YES; 63 return YES;
68 } 64 }
69 65
70 @end 66 @end
OLDNEW
« no previous file with comments | « ios/web_view/public/cwv_web_view.h ('k') | ios/web_view/shell/shell_view_controller.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698