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 |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #import <GLKit/GLKit.h> | 13 #import <GLKit/GLKit.h> |
14 | 14 |
15 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate
rialButtons.h" | 15 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate
rialButtons.h" |
16 #import "remoting/ios/client_gestures.h" | 16 #import "remoting/ios/client_gestures.h" |
17 #import "remoting/ios/client_keyboard.h" | 17 #import "remoting/ios/client_keyboard.h" |
18 #import "remoting/ios/session/remoting_client.h" | 18 #import "remoting/ios/session/remoting_client.h" |
19 | 19 |
20 #include "base/strings/sys_string_conversions.h" | 20 #include "base/strings/sys_string_conversions.h" |
| 21 #include "remoting/client/gesture_interpreter.h" |
21 #include "remoting/client/input/keyboard_interpreter.h" | 22 #include "remoting/client/input/keyboard_interpreter.h" |
22 #include "remoting/client/ui/gesture_interpreter.h" | |
23 | 23 |
24 static const CGFloat kFabInset = 15.f; | 24 static const CGFloat kFabInset = 15.f; |
25 static const CGFloat kKeyboardAnimationTime = 0.3; | 25 static const CGFloat kKeyboardAnimationTime = 0.3; |
26 | 26 |
27 @interface HostViewController ()<ClientKeyboardDelegate> { | 27 @interface HostViewController ()<ClientKeyboardDelegate> { |
28 RemotingClient* _client; | 28 RemotingClient* _client; |
29 MDCFloatingButton* _floatingButton; | 29 MDCFloatingButton* _floatingButton; |
30 ClientGestures* _clientGestures; | 30 ClientGestures* _clientGestures; |
31 ClientKeyboard* _clientKeyboard; | 31 ClientKeyboard* _clientKeyboard; |
32 CGSize _keyboardSize; | 32 CGSize _keyboardSize; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // Target the alert menu at the top middle of the FAB. | 263 // Target the alert menu at the top middle of the FAB. |
264 alert.popoverPresentationController.sourceRect = CGRectMake( | 264 alert.popoverPresentationController.sourceRect = CGRectMake( |
265 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); | 265 _floatingButton.center.x, _floatingButton.frame.origin.y, 1.0, 1.0); |
266 | 266 |
267 alert.popoverPresentationController.permittedArrowDirections = | 267 alert.popoverPresentationController.permittedArrowDirections = |
268 UIPopoverArrowDirectionDown; | 268 UIPopoverArrowDirectionDown; |
269 [self presentViewController:alert animated:YES completion:nil]; | 269 [self presentViewController:alert animated:YES completion:nil]; |
270 } | 270 } |
271 | 271 |
272 @end | 272 @end |
OLD | NEW |