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]; |
} |