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

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

Issue 2882653004: [CRD iOS] Injecting scroll events w/ fling animation (Closed)
Patch Set: Rebase 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
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_INPUT_STRATEGY_H_ 5 #ifndef REMOTING_CLIENT_UI_INPUT_STRATEGY_H_
6 #define REMOTING_CLIENT_UI_INPUT_STRATEGY_H_ 6 #define REMOTING_CLIENT_UI_INPUT_STRATEGY_H_
7 7
8 #include "remoting/client/ui/view_matrix.h" 8 #include "remoting/client/ui/view_matrix.h"
9 9
10 namespace remoting { 10 namespace remoting {
(...skipping 29 matching lines...) Expand all
40 40
41 // Called when a touch input (which will end up injecting a mouse event at 41 // Called when a touch input (which will end up injecting a mouse event at
42 // certain position in the host) is done at |touch_point|. 42 // certain position in the host) is done at |touch_point|.
43 // The implementation should move the cursor to proper position. 43 // The implementation should move the cursor to proper position.
44 virtual void TrackTouchInput(const ViewMatrix::Point& touch_point, 44 virtual void TrackTouchInput(const ViewMatrix::Point& touch_point,
45 const DesktopViewport& viewport) = 0; 45 const DesktopViewport& viewport) = 0;
46 46
47 // Returns the current cursor position. 47 // Returns the current cursor position.
48 virtual ViewMatrix::Point GetCursorPosition() const = 0; 48 virtual ViewMatrix::Point GetCursorPosition() const = 0;
49 49
50 // Maps a scroll vector in the surface coordinate to the vector to be used to
51 // scroll the mouse wheel on the host.
52 virtual ViewMatrix::Vector2D MapScrollVector(
nicholss 2017/05/16 18:13:11 I would expect this function to be MapXtoY style.
Yuwei 2017/05/17 05:42:20 Done. Renamed to MapScreenVectorToDesktop
53 const ViewMatrix::Vector2D& delta,
54 const DesktopViewport& viewport) const = 0;
55
50 // Returns the maximum radius of the feedback animation on the surface's 56 // Returns the maximum radius of the feedback animation on the surface's
51 // coordinate for the given input type. The feedback will then be shown on the 57 // coordinate for the given input type. The feedback will then be shown on the
52 // cursor positions returned by GetCursorPosition(). Return 0 if no feedback 58 // cursor positions returned by GetCursorPosition(). Return 0 if no feedback
53 // should be shown. 59 // should be shown.
54 virtual float GetFeedbackRadius(InputFeedbackType type) const = 0; 60 virtual float GetFeedbackRadius(InputFeedbackType type) const = 0;
55 61
56 // Returns true if the input strategy maintains a visible cursor on the 62 // Returns true if the input strategy maintains a visible cursor on the
57 // desktop. 63 // desktop.
58 virtual bool IsCursorVisible() const = 0; 64 virtual bool IsCursorVisible() const = 0;
59 }; 65 };
60 66
61 } // namespace remoting 67 } // namespace remoting
62 #endif // REMOTING_CLIENT_UI_INPUT_STRATEGY_H_ 68 #endif // REMOTING_CLIENT_UI_INPUT_STRATEGY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698