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

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

Issue 2949713002: [CRD iOS] Refactor an interface for RemotingAuthorization (Closed)
Patch Set: Rebase 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_view_controller_chromium.mm
diff --git a/remoting/ios/app/app_view_controller_chromium.mm b/remoting/ios/app/app_view_controller_chromium.mm
index fb91461f63e9be05bda0ab2a8c9be467f834e5de..b7bf4553e2dc94082b3f10b9cec92b78ec611ebf 100644
--- a/remoting/ios/app/app_view_controller_chromium.mm
+++ b/remoting/ios/app/app_view_controller_chromium.mm
@@ -11,11 +11,11 @@
#include "base/logging.h"
#import "remoting/ios/app/remoting_menu_view_controller.h"
+#import "remoting/ios/facade/remoting_oauth_authentication.h"
// The Chromium implementation for the AppViewController. It simply shows the
// menu modally.
@interface AppViewController () {
- UIViewController* _mainViewController;
RemotingMenuViewController* _menuController; // nullable
}
@@ -23,20 +23,16 @@
@implementation AppViewController
-- (instancetype)initWithMainViewController:
- (UIViewController*)mainViewController {
+@synthesize authentication = _authentication;
+@synthesize mainViewController = _mainViewController;
+
+- (instancetype)init {
if (self = [super init]) {
- _mainViewController = mainViewController;
+ _authentication = [[RemotingOAuthAuthentication alloc] init];
}
return self;
}
-- (void)viewDidLoad {
- [self addChildViewController:_mainViewController];
- [self.view addSubview:_mainViewController.view];
- [_mainViewController didMoveToParentViewController:self];
-}
-
#pragma mark - AppController
- (void)showMenuAnimated:(BOOL)animated {
if (_menuController != nil && [_menuController isBeingPresented]) {
@@ -66,4 +62,14 @@
return _mainViewController;
}
+#pragma mark - Properties
+
+- (void)setMainViewController:(UIViewController*)mainViewController {
+ DCHECK(self.view != nil);
+ _mainViewController = mainViewController;
+ [self addChildViewController:_mainViewController];
+ [self.view addSubview:_mainViewController.view];
+ [_mainViewController didMoveToParentViewController:self];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698