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

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

Issue 2653083002: Cleanup ios/web_view. (Closed)
Patch Set: Respond to more 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.h » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..eefdc17c53d9d9e466beba731d1df8b50f1e1ab8
--- /dev/null
+++ b/ios/web_view/shell/shell_app_delegate.mm
@@ -0,0 +1,57 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#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;
+}
+@end
+
+@implementation ShellAppDelegate
+
+@synthesize window = _window;
+
+- (BOOL)application:(UIApplication*)application
+ didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
+ _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.window.backgroundColor = [UIColor whiteColor];
+
+ _delegate.reset([[ShellDelegate alloc] init]);
+ [CRIWV configureWithDelegate:_delegate];
+
+ base::scoped_nsobject<ShellViewController> controller(
+ [[ShellViewController alloc] init]);
+ self.window.rootViewController = controller;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication*)application {
+}
+
+- (void)applicationDidEnterBackground:(UIApplication*)application {
+}
+
+- (void)applicationWillEnterForeground:(UIApplication*)application {
+}
+
+- (void)applicationDidBecomeActive:(UIApplication*)application {
+}
+
+- (void)applicationWillTerminate:(UIApplication*)application {
+ [CRIWV shutDown];
+}
+
+- (void)dealloc {
+ [self.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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698