| 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 #ifndef REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ | 5 #ifndef REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ |
| 6 #define REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ | 6 #define REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "remoting/client/ui/desktop_viewport.h" | 10 #include "remoting/client/ui/desktop_viewport.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 void InjectMouseClick(float x, | 85 void InjectMouseClick(float x, |
| 86 float y, | 86 float y, |
| 87 protocol::MouseEvent_MouseButton button); | 87 protocol::MouseEvent_MouseButton button); |
| 88 | 88 |
| 89 void InjectCursorPosition(float x, float y); | 89 void InjectCursorPosition(float x, float y); |
| 90 | 90 |
| 91 void SetGestureInProgress(InputStrategy::Gesture gesture, | 91 void SetGestureInProgress(InputStrategy::Gesture gesture, |
| 92 bool is_in_progress); | 92 bool is_in_progress); |
| 93 | 93 |
| 94 // Tracks the touch point and gets back the cursor position from the input | |
| 95 // strategy. | |
| 96 ViewMatrix::Point TrackAndGetPosition(float touch_x, float touch_y); | |
| 97 | |
| 98 // Starts the given feedback at (cursor_x, cursor_y) if the feedback radius | 94 // Starts the given feedback at (cursor_x, cursor_y) if the feedback radius |
| 99 // is non-zero. | 95 // is non-zero. |
| 100 void StartInputFeedback(float cursor_x, | 96 void StartInputFeedback(float cursor_x, |
| 101 float cursor_y, | 97 float cursor_y, |
| 102 InputStrategy::InputFeedbackType feedback_type); | 98 InputStrategy::InputFeedbackType feedback_type); |
| 103 | 99 |
| 104 InputMode input_mode_ = UNDEFINED_INPUT_MODE; | 100 InputMode input_mode_ = UNDEFINED_INPUT_MODE; |
| 105 std::unique_ptr<InputStrategy> input_strategy_; | 101 std::unique_ptr<InputStrategy> input_strategy_; |
| 106 DesktopViewport viewport_; | 102 DesktopViewport viewport_; |
| 107 RendererProxy* renderer_; | 103 RendererProxy* renderer_; |
| 108 ChromotingSession* input_stub_; | 104 ChromotingSession* input_stub_; |
| 109 InputStrategy::Gesture gesture_in_progress_; | 105 InputStrategy::Gesture gesture_in_progress_; |
| 110 | 106 |
| 111 FlingAnimation pan_animation_; | 107 FlingAnimation pan_animation_; |
| 112 FlingAnimation scroll_animation_; | 108 FlingAnimation scroll_animation_; |
| 113 | 109 |
| 114 // GestureInterpreter is neither copyable nor movable. | 110 // GestureInterpreter is neither copyable nor movable. |
| 115 GestureInterpreter(const GestureInterpreter&) = delete; | 111 GestureInterpreter(const GestureInterpreter&) = delete; |
| 116 GestureInterpreter& operator=(const GestureInterpreter&) = delete; | 112 GestureInterpreter& operator=(const GestureInterpreter&) = delete; |
| 117 }; | 113 }; |
| 118 | 114 |
| 119 } // namespace remoting | 115 } // namespace remoting |
| 120 #endif // REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ | 116 #endif // REMOTING_CLIENT_UI_GESTURE_INTERPRETER_H_ |
| OLD | NEW |