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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 UICollectionViewFlowLayout* layout = | 51 UICollectionViewFlowLayout* layout = |
52 [[MDCCollectionViewFlowLayout alloc] init]; | 52 [[MDCCollectionViewFlowLayout alloc] init]; |
53 layout.minimumInteritemSpacing = 0; | 53 layout.minimumInteritemSpacing = 0; |
54 CGFloat sectionInset = kHostInset * 2.f; | 54 CGFloat sectionInset = kHostInset * 2.f; |
55 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, | 55 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, |
56 sectionInset, sectionInset)]; | 56 sectionInset, sectionInset)]; |
57 HostCollectionViewController* collectionVC = [ | 57 HostCollectionViewController* collectionVC = [ |
58 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; | 58 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; |
59 self = [super initWithContentViewController:collectionVC]; | 59 self = [super initWithContentViewController:collectionVC]; |
60 if (self) { | 60 if (self) { |
61 _remotingService = [RemotingService SharedInstance]; | 61 _remotingService = RemotingService.instance; |
62 | 62 |
63 _collectionViewController = collectionVC; | 63 _collectionViewController = collectionVC; |
64 _collectionViewController.flexHeaderContainerViewController = self; | 64 _collectionViewController.flexHeaderContainerViewController = self; |
65 _collectionViewController.delegate = self; | 65 _collectionViewController.delegate = self; |
66 | 66 |
67 _appBar = [[MDCAppBar alloc] init]; | 67 _appBar = [[MDCAppBar alloc] init]; |
68 [self addChildViewController:_appBar.headerViewController]; | 68 [self addChildViewController:_appBar.headerViewController]; |
69 | 69 |
70 self.navigationItem.title = @"Chrome Remote Desktop"; | 70 self.navigationItem.title = @"Chrome Remote Desktop"; |
71 | 71 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; | 256 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; |
257 if (_isAuthenticated) { | 257 if (_isAuthenticated) { |
258 message.text = [NSString | 258 message.text = [NSString |
259 stringWithFormat:@"Currently signed in as %@.", | 259 stringWithFormat:@"Currently signed in as %@.", |
260 _remotingService.authentication.user.userEmail]; | 260 _remotingService.authentication.user.userEmail]; |
261 [MDCSnackbarManager showMessage:message]; | 261 [MDCSnackbarManager showMessage:message]; |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 @end | 265 @end |
OLD | NEW |