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

Unified Diff: remoting/ios/app/host_view_controller.mm

Issue 2904703003: [CRD iOS] Add support for three-finger gestures (Closed)
Patch Set: Remove unused import 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/gesture_interpreter.cc ('k') | remoting/ios/client_gestures.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/app/host_view_controller.mm
diff --git a/remoting/ios/app/host_view_controller.mm b/remoting/ios/app/host_view_controller.mm
index 9fd272d06f1e2f708d50beac1797801432f729b9..07fa9f4968f1ea1b2eaf165dbd9e4281b063699c 100644
--- a/remoting/ios/app/host_view_controller.mm
+++ b/remoting/ios/app/host_view_controller.mm
@@ -24,7 +24,8 @@
static const CGFloat kFabInset = 15.f;
static const CGFloat kKeyboardAnimationTime = 0.3;
-@interface HostViewController ()<ClientKeyboardDelegate> {
+@interface HostViewController ()<ClientKeyboardDelegate,
+ ClientGesturesDelegate> {
RemotingClient* _client;
MDCFloatingButton* _floatingButton;
ClientGestures* _clientGestures;
@@ -100,6 +101,7 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
_clientGestures =
[[ClientGestures alloc] initWithView:self.view client:_client];
+ _clientGestures.delegate = self;
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(keyboardWillShow:)
@@ -200,6 +202,16 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
_client.keyboardInterpreter->HandleDeleteEvent(0);
}
+#pragma mark - ClientGesturesDelegate
+
+- (void)keyboardShouldShow {
+ [self showKeyboard];
+}
+
+- (void)keyboardShouldHide {
+ [self hideKeyboard];
+}
+
#pragma mark - Private
- (void)didTap:(id)sender {
« no previous file with comments | « remoting/client/gesture_interpreter.cc ('k') | remoting/ios/client_gestures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698