| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 - (void)viewDidDisappear:(BOOL)animated { | 93 - (void)viewDidDisappear:(BOOL)animated { |
| 94 [super viewDidDisappear:animated]; | 94 [super viewDidDisappear:animated]; |
| 95 [(GLKView*)self.view deleteDrawable]; | 95 [(GLKView*)self.view deleteDrawable]; |
| 96 } | 96 } |
| 97 | 97 |
| 98 - (void)viewWillAppear:(BOOL)animated { | 98 - (void)viewWillAppear:(BOOL)animated { |
| 99 [super viewWillAppear:animated]; | 99 [super viewWillAppear:animated]; |
| 100 | 100 |
| 101 _clientGestures = | 101 _clientGestures = [[ClientGestures alloc] initWithHostViewController:self]; |
| 102 [[ClientGestures alloc] initWithView:self.view client:_client]; | |
| 103 [[NSNotificationCenter defaultCenter] | 102 [[NSNotificationCenter defaultCenter] |
| 104 addObserver:self | 103 addObserver:self |
| 105 selector:@selector(keyboardWillShow:) | 104 selector:@selector(keyboardWillShow:) |
| 106 name:UIKeyboardWillShowNotification | 105 name:UIKeyboardWillShowNotification |
| 107 object:nil]; | 106 object:nil]; |
| 108 | 107 |
| 109 [[NSNotificationCenter defaultCenter] | 108 [[NSNotificationCenter defaultCenter] |
| 110 addObserver:self | 109 addObserver:self |
| 111 selector:@selector(keyboardWillHide:) | 110 selector:@selector(keyboardWillHide:) |
| 112 name:UIKeyboardWillHideNotification | 111 name:UIKeyboardWillHideNotification |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 alert.popoverPresentationController.sourceView = self.view; | 261 alert.popoverPresentationController.sourceView = self.view; |
| 263 // Target the alert menu at the top middle of the FAB. | 262 // Target the alert menu at the top middle of the FAB. |
| 264 alert.popoverPresentationController.sourceRect = CGRectMake( | 263 alert.popoverPresentationController.sourceRect = CGRectMake( |
| 265 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); | 264 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); |
| 266 | 265 |
| 267 alert.popoverPresentationController.permittedArrowDirections = | 266 alert.popoverPresentationController.permittedArrowDirections = |
| 268 UIPopoverArrowDirectionDown; | 267 UIPopoverArrowDirectionDown; |
| 269 [self presentViewController:alert animated:YES completion:nil]; | 268 [self presentViewController:alert animated:YES completion:nil]; |
| 270 } | 269 } |
| 271 | 270 |
| 271 #pragma mark properties |
| 272 |
| 273 - (RemotingClient*)client { |
| 274 return _client; |
| 275 } |
| 276 |
| 272 @end | 277 @end |
| OLD | NEW |