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

Side by Side Diff: remoting/client/ui/direct_input_strategy.h

Issue 2879743002: [CRD iOS] Hook the touch input feedback (Closed)
Patch Set: Fix dependency and race condition 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 unified diff | Download patch
« no previous file with comments | « remoting/client/ui/BUILD.gn ('k') | remoting/client/ui/direct_input_strategy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SIMULATED_TOUCH_INPUT_STRATEGY_H_ 5 #ifndef REMOTING_CLIENT_UI_SIMULATED_TOUCH_INPUT_STRATEGY_H_
6 #define REMOTING_CLIENT_UI_SIMULATED_TOUCH_INPUT_STRATEGY_H_ 6 #define REMOTING_CLIENT_UI_SIMULATED_TOUCH_INPUT_STRATEGY_H_
7 7
8 #include "remoting/client/ui/input_strategy.h" 8 #include "remoting/client/ui/input_strategy.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 // This strategy directly translates all operations on the OpenGL view into 12 // This strategy directly translates all operations on the OpenGL view into
13 // corresponding operations on the desktop. It doesn't maintain the cursor 13 // corresponding operations on the desktop. It doesn't maintain the cursor
14 // positions separately -- the positions come from the location of the touch. 14 // positions separately -- the positions come from the location of the touch.
15 class DirectInputStrategy : public InputStrategy { 15 class DirectInputStrategy : public InputStrategy {
16 public: 16 public:
17 DirectInputStrategy(); 17 DirectInputStrategy();
18 ~DirectInputStrategy() override; 18 ~DirectInputStrategy() override;
19 19
20 // InputStrategy overrides. 20 // InputStrategy overrides.
21 21
22 void HandlePinch(float pivot_x, 22 void HandlePinch(const ViewMatrix::Point& pivot,
23 float pivot_y,
24 float scale, 23 float scale,
25 DesktopViewport* viewport) override; 24 DesktopViewport* viewport) override;
26 25
27 void HandlePan(float translation_x, 26 void HandlePan(const ViewMatrix::Vector2D& translation,
28 float translation_y,
29 bool is_dragging_mode, 27 bool is_dragging_mode,
30 DesktopViewport* viewport) override; 28 DesktopViewport* viewport) override;
31 29
32 void FindCursorPositions(float touch_x, 30 void TrackTouchInput(const ViewMatrix::Point& touch_point,
33 float touch_y, 31 const DesktopViewport& viewport) override;
34 const DesktopViewport& viewport, 32
35 float* cursor_x, 33 ViewMatrix::Point GetCursorPosition() const override;
36 float* cursor_y) override; 34
35 float GetFeedbackRadius(InputFeedbackType type) const override;
37 36
38 bool IsCursorVisible() const override; 37 bool IsCursorVisible() const override;
39 38
40 private: 39 private:
40 ViewMatrix::Point cursor_position_{0.f, 0.f};
41
41 // TouchInputStrategy is neither copyable nor movable. 42 // TouchInputStrategy is neither copyable nor movable.
42 DirectInputStrategy(const DirectInputStrategy&) = delete; 43 DirectInputStrategy(const DirectInputStrategy&) = delete;
43 DirectInputStrategy& operator=(const DirectInputStrategy&) = delete; 44 DirectInputStrategy& operator=(const DirectInputStrategy&) = delete;
44 }; 45 };
45 46
46 } // namespace remoting 47 } // namespace remoting
47 #endif // REMOTING_CLIENT_UI_SIMULATED_TOUCH_INPUT_STRATEGY_H_ 48 #endif // REMOTING_CLIENT_UI_SIMULATED_TOUCH_INPUT_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/client/ui/BUILD.gn ('k') | remoting/client/ui/direct_input_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698