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

Unified Diff: remoting/client/input_strategy.h

Issue 2879743002: [CRD iOS] Hook the touch input feedback (Closed)
Patch Set: Use the ui task poster 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/input_strategy.h
diff --git a/remoting/client/input_strategy.h b/remoting/client/input_strategy.h
index 5f171681a61f96514eab8f3d795be789ed2ef1f1..8f14581b4cbf424422783b0493c48e2526432755 100644
--- a/remoting/client/input_strategy.h
+++ b/remoting/client/input_strategy.h
@@ -13,6 +13,11 @@ class DesktopViewport;
// are handled.
class InputStrategy {
public:
+ enum InputFeedbackType {
+ TAP_FEEDBACK,
+ LONG_PRESS_FEEDBACK,
+ };
+
virtual ~InputStrategy() {}
// Called when the GestureInterpreter receives a pinch gesture. The
@@ -33,14 +38,21 @@ class InputStrategy {
bool is_dragging_mode,
DesktopViewport* viewport) = 0;
- // Called when a gesture is done at location (touch_x, touch_y) and the
- // GestureInterpreter needs to get back the cursor position to inject mouse
- // the mouse event.
- virtual void FindCursorPositions(float touch_x,
- float touch_y,
- const DesktopViewport& viewport,
- float* cursor_x,
- float* cursor_y) = 0;
+ // Called when a touch input (which will end up injecting a mouse event at
+ // certain position in the host) is done at location (touch_x, touch_y).
+ // The implementation should move the cursor to proper position.
+ virtual void TrackTouchInput(float touch_x,
+ float touch_y,
+ const DesktopViewport& viewport) = 0;
+
+ // Writes the cursor position to cursor_x and cursor_y.
+ virtual void GetCursorPosition(float* cursor_x, float* cursor_y) const = 0;
+
+ // Returns the maximum radius of the feedback animation on the surface's
+ // coordinate for the given input type. The feedback will then be shown on the
+ // cursor positions returned by FindCursorPositions(). Return 0 if no feedback
+ // should be shown.
+ virtual float GetFeedbackRadius(InputFeedbackType type) const = 0;
// Returns true if the input strategy maintains a visible cursor on the
// desktop.

Powered by Google App Engine
This is Rietveld 408576698