| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 ? remoting::GestureInterpreter::TRACKPAD_INPUT_MODE | 303 ? remoting::GestureInterpreter::TRACKPAD_INPUT_MODE |
| 304 : remoting::GestureInterpreter::DIRECT_INPUT_MODE); | 304 : remoting::GestureInterpreter::DIRECT_INPUT_MODE); |
| 305 [_actionImageView setActive:NO animated:YES]; | 305 [_actionImageView setActive:NO animated:YES]; |
| 306 }; | 306 }; |
| 307 [alert addAction:[UIAlertAction actionWithTitle:switchInputModeTitle | 307 [alert addAction:[UIAlertAction actionWithTitle:switchInputModeTitle |
| 308 style:UIAlertActionStyleDefault | 308 style:UIAlertActionStyleDefault |
| 309 handler:switchInputModeHandler]]; | 309 handler:switchInputModeHandler]]; |
| 310 | 310 |
| 311 void (^disconnectHandler)(UIAlertAction*) = ^(UIAlertAction*) { | 311 void (^disconnectHandler)(UIAlertAction*) = ^(UIAlertAction*) { |
| 312 [_client disconnectFromHost]; | 312 [_client disconnectFromHost]; |
| 313 [self.navigationController popViewControllerAnimated:YES]; | 313 [self.navigationController popToRootViewControllerAnimated:YES]; |
| 314 [_actionImageView setActive:NO animated:YES]; | 314 [_actionImageView setActive:NO animated:YES]; |
| 315 }; | 315 }; |
| 316 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect" | 316 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect" |
| 317 style:UIAlertActionStyleDefault | 317 style:UIAlertActionStyleDefault |
| 318 handler:disconnectHandler]]; | 318 handler:disconnectHandler]]; |
| 319 | 319 |
| 320 __weak HostViewController* weakSelf = self; | 320 __weak HostViewController* weakSelf = self; |
| 321 void (^settingsHandler)(UIAlertAction*) = ^(UIAlertAction*) { | 321 void (^settingsHandler)(UIAlertAction*) = ^(UIAlertAction*) { |
| 322 RemotingSettingsViewController* settingsViewController = | 322 RemotingSettingsViewController* settingsViewController = |
| 323 [[RemotingSettingsViewController alloc] init]; | 323 [[RemotingSettingsViewController alloc] init]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 346 alert.popoverPresentationController.sourceRect = CGRectMake( | 346 alert.popoverPresentationController.sourceRect = CGRectMake( |
| 347 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); | 347 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); |
| 348 | 348 |
| 349 alert.popoverPresentationController.permittedArrowDirections = | 349 alert.popoverPresentationController.permittedArrowDirections = |
| 350 UIPopoverArrowDirectionDown; | 350 UIPopoverArrowDirectionDown; |
| 351 [self presentViewController:alert animated:YES completion:nil]; | 351 [self presentViewController:alert animated:YES completion:nil]; |
| 352 [_actionImageView setActive:YES animated:YES]; | 352 [_actionImageView setActive:YES animated:YES]; |
| 353 } | 353 } |
| 354 | 354 |
| 355 @end | 355 @end |
| OLD | NEW |