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

Unified Diff: ios/web_view/shell/shell_app_delegate.mm

Issue 2665653003: Convert ios/web_view to ARC. (Closed)
Patch Set: Respond to comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/shell/shell_app_delegate.h ('k') | ios/web_view/shell/shell_delegate.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/shell/shell_app_delegate.mm
diff --git a/ios/web_view/shell/shell_app_delegate.mm b/ios/web_view/shell/shell_app_delegate.mm
index 61da172ca16ea82aad62e24e8e2fd37bfa66cf85..fa6bfc69452eb2fcf572ecd0213d990ee6e3deb3 100644
--- a/ios/web_view/shell/shell_app_delegate.mm
+++ b/ios/web_view/shell/shell_app_delegate.mm
@@ -4,32 +4,34 @@
#import "ios/web_view/shell/shell_app_delegate.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/web_view/public/criwv.h"
#import "ios/web_view/shell/shell_delegate.h"
#import "ios/web_view/shell/shell_view_controller.h"
-@interface ShellAppDelegate () {
- base::scoped_nsobject<ShellDelegate> _delegate;
-}
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@interface ShellAppDelegate ()
+@property (nonatomic, strong) ShellDelegate* delegate;
@end
@implementation ShellAppDelegate
+@synthesize delegate = _delegate;
@synthesize window = _window;
- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
- _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
- _delegate.reset([[ShellDelegate alloc] init]);
+ self.delegate = [[ShellDelegate alloc] init];
[CRIWV configureWithDelegate:_delegate];
[self.window makeKeyAndVisible];
- base::scoped_nsobject<ShellViewController> controller(
- [[ShellViewController alloc] init]);
+ ShellViewController* controller = [[ShellViewController alloc] init];
self.window.rootViewController = controller;
return YES;
@@ -51,9 +53,4 @@
[CRIWV shutDown];
}
-- (void)dealloc {
- [_window release];
- [super dealloc];
-}
-
@end
« no previous file with comments | « ios/web_view/shell/shell_app_delegate.h ('k') | ios/web_view/shell/shell_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698