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

Side by Side Diff: remoting/ios/app/remoting_view_controller.mm

Issue 2886233003: [CRD iOS] Fix the leaky RemotingClient (Closed)
Patch Set: WIP Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « remoting/ios/app/host_view_controller.mm ('k') | remoting/ios/display/gl_display_handler.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/ios/app/host_view_controller.mm ('k') | remoting/ios/display/gl_display_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698