| 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/host_view_controller.h" | 9 #import "remoting/ios/app/host_view_controller.h" |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 addObserver:self | 104 addObserver:self |
| 105 selector:@selector(keyboardWillHide:) | 105 selector:@selector(keyboardWillHide:) |
| 106 name:UIKeyboardWillHideNotification | 106 name:UIKeyboardWillHideNotification |
| 107 object:nil]; | 107 object:nil]; |
| 108 } | 108 } |
| 109 | 109 |
| 110 - (void)viewWillDisappear:(BOOL)animated { | 110 - (void)viewWillDisappear:(BOOL)animated { |
| 111 [super viewWillDisappear:animated]; | 111 [super viewWillDisappear:animated]; |
| 112 | 112 |
| 113 _clientGestures = nil; | 113 _clientGestures = nil; |
| 114 _client = nil; |
| 114 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 115 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 115 } | 116 } |
| 116 | 117 |
| 117 - (void)viewDidLayoutSubviews { | 118 - (void)viewDidLayoutSubviews { |
| 118 [super viewDidLayoutSubviews]; | 119 [super viewDidLayoutSubviews]; |
| 119 | 120 |
| 120 if (((GLKView*)self.view).context != nil) { | 121 if (((GLKView*)self.view).context != nil) { |
| 121 // If the context is not set yet, the view size will be set in | 122 // If the context is not set yet, the view size will be set in |
| 122 // viewDidAppear. | 123 // viewDidAppear. |
| 123 [_client surfaceChanged:self.view.bounds]; | 124 [_client surfaceChanged:self.view.bounds]; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 [self dismissViewControllerAnimated:YES completion:nil]; | 216 [self dismissViewControllerAnimated:YES completion:nil]; |
| 216 }; | 217 }; |
| 217 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect" | 218 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect" |
| 218 style:UIAlertActionStyleCancel | 219 style:UIAlertActionStyleCancel |
| 219 handler:disconnectHandler]]; | 220 handler:disconnectHandler]]; |
| 220 | 221 |
| 221 [self presentViewController:alert animated:YES completion:nil]; | 222 [self presentViewController:alert animated:YES completion:nil]; |
| 222 } | 223 } |
| 223 | 224 |
| 224 @end | 225 @end |
| OLD | NEW |