| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 completion:(void (^)())completionBlock { | 180 completion:(void (^)())completionBlock { |
| 181 if (![cell.hostInfo isOnline]) { | 181 if (![cell.hostInfo isOnline]) { |
| 182 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; | 182 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; |
| 183 message.text = @"Host is offline."; | 183 message.text = @"Host is offline."; |
| 184 [MDCSnackbarManager showMessage:message]; | 184 [MDCSnackbarManager showMessage:message]; |
| 185 return; | 185 return; |
| 186 } | 186 } |
| 187 | 187 |
| 188 ClientConnectionViewController* clientConnectionViewController = | 188 ClientConnectionViewController* clientConnectionViewController = |
| 189 [[ClientConnectionViewController alloc] initWithHostInfo:cell.hostInfo]; | 189 [[ClientConnectionViewController alloc] initWithHostInfo:cell.hostInfo]; |
| 190 [self presentViewController:clientConnectionViewController | 190 [self.navigationController pushViewController:clientConnectionViewController |
| 191 animated:YES | 191 animated:YES]; |
| 192 completion:nil]; | |
| 193 completionBlock(); | 192 completionBlock(); |
| 194 } | 193 } |
| 195 | 194 |
| 196 - (NSInteger)getHostCount { | 195 - (NSInteger)getHostCount { |
| 197 return _remotingService.hosts.count; | 196 return _remotingService.hosts.count; |
| 198 } | 197 } |
| 199 | 198 |
| 200 - (HostInfo*)getHostAtIndexPath:(NSIndexPath*)path { | 199 - (HostInfo*)getHostAtIndexPath:(NSIndexPath*)path { |
| 201 return _remotingService.hosts[path.row]; | 200 return _remotingService.hosts[path.row]; |
| 202 } | 201 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; | 250 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; |
| 252 if (_isAuthenticated) { | 251 if (_isAuthenticated) { |
| 253 message.text = [NSString | 252 message.text = [NSString |
| 254 stringWithFormat:@"Currently signed in as %@.", | 253 stringWithFormat:@"Currently signed in as %@.", |
| 255 _remotingService.authentication.user.userEmail]; | 254 _remotingService.authentication.user.userEmail]; |
| 256 [MDCSnackbarManager showMessage:message]; | 255 [MDCSnackbarManager showMessage:message]; |
| 257 } | 256 } |
| 258 } | 257 } |
| 259 | 258 |
| 260 @end | 259 @end |
| OLD | NEW |