| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #import "remoting/ios/app/remoting_view_controller.h" | 9 #import "remoting/ios/app/remoting_view_controller.h" |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // TODO(nicholss): Localize this file. | 44 // TODO(nicholss): Localize this file. |
| 45 // TODO(nicholss): This file is not finished with integration, the app flow is | 45 // TODO(nicholss): This file is not finished with integration, the app flow is |
| 46 // still pending development. | 46 // still pending development. |
| 47 | 47 |
| 48 @implementation RemotingViewController | 48 @implementation RemotingViewController |
| 49 | 49 |
| 50 - (instancetype)init { | 50 - (instancetype)init { |
| 51 _isAuthenticated = NO; | 51 _isAuthenticated = NO; |
| 52 UICollectionViewFlowLayout* layout = | 52 UICollectionViewFlowLayout* layout = |
| 53 [[UICollectionViewFlowLayout alloc] init]; | 53 [[MDCCollectionViewFlowLayout alloc] init]; |
| 54 layout.minimumInteritemSpacing = 0; | 54 layout.minimumInteritemSpacing = 0; |
| 55 CGFloat sectionInset = kHostInset * 2.f; | 55 CGFloat sectionInset = kHostInset * 2.f; |
| 56 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, | 56 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, |
| 57 sectionInset, sectionInset)]; | 57 sectionInset, sectionInset)]; |
| 58 HostCollectionViewController* collectionVC = [ | 58 HostCollectionViewController* collectionVC = [ |
| 59 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; | 59 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; |
| 60 self = [super initWithContentViewController:collectionVC]; | 60 self = [super initWithContentViewController:collectionVC]; |
| 61 if (self) { | 61 if (self) { |
| 62 _remotingService = [RemotingService SharedInstance]; | 62 _remotingService = [RemotingService SharedInstance]; |
| 63 | 63 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; | 288 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; |
| 289 if (_isAuthenticated) { | 289 if (_isAuthenticated) { |
| 290 message.text = [NSString | 290 message.text = [NSString |
| 291 stringWithFormat:@"Currently signed in as %@.", | 291 stringWithFormat:@"Currently signed in as %@.", |
| 292 _remotingService.authentication.user.userEmail]; | 292 _remotingService.authentication.user.userEmail]; |
| 293 [MDCSnackbarManager showMessage:message]; | 293 [MDCSnackbarManager showMessage:message]; |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 @end | 297 @end |
| OLD | NEW |