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/client_gestures.h" | 9 #import "remoting/ios/client_gestures.h" |
10 | 10 |
11 #import "remoting/ios/session/remoting_client.h" | 11 #import "remoting/ios/session/remoting_client.h" |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "remoting/client/ui/gesture_interpreter.h" | 14 #include "remoting/client/gesture_interpreter.h" |
15 | 15 |
16 remoting::GestureInterpreter::GestureState toGestureState( | 16 remoting::GestureInterpreter::GestureState toGestureState( |
17 UIGestureRecognizerState state) { | 17 UIGestureRecognizerState state) { |
18 switch (state) { | 18 switch (state) { |
19 case UIGestureRecognizerStateBegan: | 19 case UIGestureRecognizerStateBegan: |
20 return remoting::GestureInterpreter::GESTURE_BEGAN; | 20 return remoting::GestureInterpreter::GESTURE_BEGAN; |
21 case UIGestureRecognizerStateChanged: | 21 case UIGestureRecognizerStateChanged: |
22 return remoting::GestureInterpreter::GESTURE_CHANGED; | 22 return remoting::GestureInterpreter::GESTURE_CHANGED; |
23 default: | 23 default: |
24 return remoting::GestureInterpreter::GESTURE_ENDED; | 24 return remoting::GestureInterpreter::GESTURE_ENDED; |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 otherGestureRecognizer == _edgeGesture) { | 400 otherGestureRecognizer == _edgeGesture) { |
401 return YES; | 401 return YES; |
402 } | 402 } |
403 // TODO(nicholss): If we return NO here, it dismisses the other reconizers. | 403 // TODO(nicholss): If we return NO here, it dismisses the other reconizers. |
404 // As we add more types of reconizers, they need to be accounted for in the | 404 // As we add more types of reconizers, they need to be accounted for in the |
405 // above logic. | 405 // above logic. |
406 return NO; | 406 return NO; |
407 } | 407 } |
408 | 408 |
409 @end | 409 @end |
OLD | NEW |