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

Unified Diff: remoting/ios/app/app_delegate.mm

Issue 2937733003: [CRD iOS] Branching internal and external implementations (Closed)
Patch Set: Add the requestSignIn method Created 3 years, 6 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
Index: remoting/ios/app/app_delegate.mm
diff --git a/remoting/ios/app/app_delegate.mm b/remoting/ios/app/app_delegate.mm
index d6c87e00505ca54eb8cfa034a36f6a4a2349a20f..86c78e5ceb7b93129663a1143defc6053ca08d8c 100644
--- a/remoting/ios/app/app_delegate.mm
+++ b/remoting/ios/app/app_delegate.mm
@@ -12,10 +12,16 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#import "remoting/ios/app/app_view_controller.h"
#import "remoting/ios/app/remoting_view_controller.h"
#import "remoting/ios/facade/remoting_authentication.h"
#import "remoting/ios/facade/remoting_service.h"
+@interface AppDelegate () {
+ AppViewController* _appViewController;
+}
+@end
+
@implementation AppDelegate
@synthesize window = _window;
@@ -53,12 +59,34 @@
return YES;
}
+#pragma mark - Public
+- (void)setMenuVisible:(BOOL)visible animated:(BOOL)animated {
+ DCHECK(_appViewController != nil);
+ [_appViewController setMenuVisible:visible animated:animated];
+}
+
+- (void)requestSignIn {
+ DCHECK(_appViewController != nil);
+ [_appViewController requestSignIn];
+}
+
+#pragma mark - Properties
+
++ (AppDelegate*)instance {
+ return (AppDelegate*)UIApplication.sharedApplication.delegate;
+}
+
+#pragma mark - Private
+
- (void)launchRemotingViewController {
RemotingViewController* vc = [[RemotingViewController alloc] init];
UINavigationController* navController =
[[UINavigationController alloc] initWithRootViewController:vc];
navController.navigationBarHidden = true;
- self.window.rootViewController = navController;
+
+ _appViewController = [[AppViewController alloc] init];
+ _appViewController.mainViewController = navController;
+ self.window.rootViewController = _appViewController;
[self.window makeKeyAndVisible];
}

Powered by Google App Engine
This is Rietveld 408576698