| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // updated"... | 181 // updated"... |
| 182 - (void)hostListUpdated { | 182 - (void)hostListUpdated { |
| 183 [_collectionViewController.collectionView reloadData]; | 183 [_collectionViewController.collectionView reloadData]; |
| 184 } | 184 } |
| 185 | 185 |
| 186 #pragma mark - ClientConnectionViewControllerDelegate | 186 #pragma mark - ClientConnectionViewControllerDelegate |
| 187 | 187 |
| 188 - (void)clientConnected { | 188 - (void)clientConnected { |
| 189 HostViewController* hostViewController = | 189 HostViewController* hostViewController = |
| 190 [[HostViewController alloc] initWithClient:_client]; | 190 [[HostViewController alloc] initWithClient:_client]; |
| 191 _client = nil; |
| 191 [self presentViewController:hostViewController animated:YES completion:nil]; | 192 [self presentViewController:hostViewController animated:YES completion:nil]; |
| 192 } | 193 } |
| 193 | 194 |
| 194 - (NSString*)getConnectingHostName { | 195 - (NSString*)getConnectingHostName { |
| 195 if (_client) { | 196 if (_client) { |
| 196 return _client.hostInfo.hostName; | 197 return _client.hostInfo.hostName; |
| 197 } | 198 } |
| 198 return nil; | 199 return nil; |
| 199 } | 200 } |
| 200 | 201 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; | 288 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; |
| 288 if (_isAuthenticated) { | 289 if (_isAuthenticated) { |
| 289 message.text = [NSString | 290 message.text = [NSString |
| 290 stringWithFormat:@"Currently signed in as %@.", | 291 stringWithFormat:@"Currently signed in as %@.", |
| 291 _remotingService.authentication.user.userEmail]; | 292 _remotingService.authentication.user.userEmail]; |
| 292 [MDCSnackbarManager showMessage:message]; | 293 [MDCSnackbarManager showMessage:message]; |
| 293 } | 294 } |
| 294 } | 295 } |
| 295 | 296 |
| 296 @end | 297 @end |
| OLD | NEW |