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

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

Issue 2643773005: Upstream ios/web_view source code. (Closed)
Patch Set: Created 3 years, 11 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
(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;
sdefresne 2017/01/20 10:28:13 _window is never deallocated and thus is leaked. C
michaeldo 2017/01/24 22:35:26 In dep CL, I added dealloc. Conversion to arc will
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 [CRIWV installNetworkStack];
29
30 base::scoped_nsobject<ShellViewController> controller(
31 [[ShellViewController alloc] init]);
32 self.window.rootViewController = controller;
33 [self.window makeKeyAndVisible];
34 return YES;
35 }
36
37 - (void)applicationWillResignActive:(UIApplication*)application {
38 }
39
40 - (void)applicationDidEnterBackground:(UIApplication*)application {
41 }
42
43 - (void)applicationWillEnterForeground:(UIApplication*)application {
44 }
45
46 - (void)applicationDidBecomeActive:(UIApplication*)application {
47 }
48
49 - (void)applicationWillTerminate:(UIApplication*)application {
50 [CRIWV shutDown];
51 }
52
53 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698