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

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

Issue 2862893003: [CRD iOS] Inject mouse events to the host (Closed)
Patch Set: Resolve Feedback 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/gesture_interpreter.cc ('k') | remoting/client/ios/client_gestures.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_INPUT_STRATEGY_H_
6 #define REMOTING_CLIENT_INPUT_STRATEGY_H_
7
8 namespace remoting {
9
10 class DesktopViewport;
11
12 // This is an interface used by GestureInterpreter to customize the way gestures
13 // are handled.
14 class InputStrategy {
15 public:
16 virtual ~InputStrategy() {}
17
18 // Called when the GestureInterpreter receives a pinch gesture. The
19 // implementation is responsible for modifying the viewport and observing the
20 // change.
21 virtual void HandlePinch(float pivot_x,
22 float pivot_y,
23 float scale,
24 DesktopViewport* viewport) = 0;
25
26 // Called when the GestureInterpreter receives a pan gesture. The
27 // implementation is responsible for modifying the viewport and observing the
28 // change.
29 // is_dragging_mode: true if the user is trying to drag something while
30 // panning on the screen.
31 virtual void HandlePan(float translation_x,
32 float translation_y,
33 bool is_dragging_mode,
34 DesktopViewport* viewport) = 0;
35
36 // Called when a gesture is done at location (touch_x, touch_y) and the
37 // GestureInterpreter needs to get back the cursor position to inject mouse
38 // the mouse event.
39 virtual void FindCursorPositions(float touch_x,
40 float touch_y,
41 const DesktopViewport& viewport,
42 float* cursor_x,
43 float* cursor_y) = 0;
44
45 // Returns true if the input strategy maintains a visible cursor on the
46 // desktop.
47 virtual bool IsCursorVisible() const = 0;
48 };
49
50 } // namespace remoting
51 #endif // REMOTING_CLIENT_INPUT_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/client/gesture_interpreter.cc ('k') | remoting/client/ios/client_gestures.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698