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

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

Issue 2937733003: [CRD iOS] Branching internal and external implementations (Closed)
Patch Set: Fix presenting check 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
« no previous file with comments | « remoting/ios/app/app_delegate.h ('k') | remoting/ios/app/app_view_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..50a7597cc81d116f771850da072ba007c50ce668 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,39 @@
return YES;
}
+#pragma mark - Public
+- (void)showMenuAnimated:(BOOL)animated {
+ DCHECK(_appViewController != nil);
+ [_appViewController showMenuAnimated:animated];
+}
+
+- (void)hideMenuAnimated:(BOOL)animated {
+ DCHECK(_appViewController != nil);
+ [_appViewController hideMenuAnimated:animated];
+}
+
+- (void)presentSignInFlow {
+ DCHECK(_appViewController != nil);
+ [_appViewController presentSignInFlow];
+}
+
+#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] initWithMainViewController:navController];
+ self.window.rootViewController = _appViewController;
[self.window makeKeyAndVisible];
}
« no previous file with comments | « remoting/ios/app/app_delegate.h ('k') | remoting/ios/app/app_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698