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

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

Issue 2897143002: [CRD iOS] Ignore touch event when the touch point is out of the canvas in direct input mode (Closed)
Patch Set: 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/input_strategy.h ('k') | remoting/client/ui/trackpad_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_TRACKPAD_INPUT_STRATEGY_H_ 5 #ifndef REMOTING_CLIENT_UI_TRACKPAD_INPUT_STRATEGY_H_
6 #define REMOTING_CLIENT_UI_TRACKPAD_INPUT_STRATEGY_H_ 6 #define REMOTING_CLIENT_UI_TRACKPAD_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 simulate the trackpad's behavior. It keeps a visible cursor 12 // This strategy simulate the trackpad's behavior. It keeps a visible cursor
13 // with positions independent of the location of the touch events. 13 // with positions independent of the location of the touch events.
14 class TrackpadInputStrategy : public InputStrategy { 14 class TrackpadInputStrategy : public InputStrategy {
15 public: 15 public:
16 TrackpadInputStrategy(const DesktopViewport& viewport); 16 TrackpadInputStrategy(const DesktopViewport& viewport);
17 ~TrackpadInputStrategy() override; 17 ~TrackpadInputStrategy() override;
18 18
19 // InputStrategy overrides. 19 // InputStrategy overrides.
20 void HandleZoom(const ViewMatrix::Point& pivot, 20 void HandleZoom(const ViewMatrix::Point& pivot,
21 float scale, 21 float scale,
22 DesktopViewport* viewport) override; 22 DesktopViewport* viewport) override;
23 23
24 bool HandlePan(const ViewMatrix::Vector2D& translation, 24 bool HandlePan(const ViewMatrix::Vector2D& translation,
25 Gesture simultaneous_gesture, 25 Gesture simultaneous_gesture,
26 DesktopViewport* viewport) override; 26 DesktopViewport* viewport) override;
27 27
28 void TrackTouchInput(const ViewMatrix::Point& touch_point, 28 bool TrackTouchInput(const ViewMatrix::Point& touch_point,
29 const DesktopViewport& viewport) override; 29 const DesktopViewport& viewport) override;
30 30
31 ViewMatrix::Point GetCursorPosition() const override; 31 ViewMatrix::Point GetCursorPosition() const override;
32 32
33 ViewMatrix::Vector2D MapScreenVectorToDesktop( 33 ViewMatrix::Vector2D MapScreenVectorToDesktop(
34 const ViewMatrix::Vector2D& delta, 34 const ViewMatrix::Vector2D& delta,
35 const DesktopViewport& viewport) const override; 35 const DesktopViewport& viewport) const override;
36 36
37 float GetFeedbackRadius(InputFeedbackType type) const override; 37 float GetFeedbackRadius(InputFeedbackType type) const override;
38 38
39 bool IsCursorVisible() const override; 39 bool IsCursorVisible() const override;
40 40
41 private: 41 private:
42 ViewMatrix::Point cursor_position_; 42 ViewMatrix::Point cursor_position_;
43 43
44 // TrackpadInputStrategy is neither copyable nor movable. 44 // TrackpadInputStrategy is neither copyable nor movable.
45 TrackpadInputStrategy(const TrackpadInputStrategy&) = delete; 45 TrackpadInputStrategy(const TrackpadInputStrategy&) = delete;
46 TrackpadInputStrategy& operator=(const TrackpadInputStrategy&) = delete; 46 TrackpadInputStrategy& operator=(const TrackpadInputStrategy&) = delete;
47 }; 47 };
48 48
49 } // namespace remoting 49 } // namespace remoting
50 #endif // REMOTING_CLIENT_UI_TRACKPAD_INPUT_STRATEGY_H_ 50 #endif // REMOTING_CLIENT_UI_TRACKPAD_INPUT_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/client/ui/input_strategy.h ('k') | remoting/client/ui/trackpad_input_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698