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

Unified Diff: remoting/client/gesture_interpreter.h

Issue 2856933007: [Remoting iOS] Basic viewport manipulation support (Closed)
Patch Set: Move the delegate getter/setting to the bottom Created 3 years, 8 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
« no previous file with comments | « remoting/client/BUILD.gn ('k') | remoting/client/gesture_interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/gesture_interpreter.h
diff --git a/remoting/client/gesture_interpreter.h b/remoting/client/gesture_interpreter.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bad56792bd1863d1fb613e05a5abaf8f271cbd1
--- /dev/null
+++ b/remoting/client/gesture_interpreter.h
@@ -0,0 +1,38 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_GESTURE_INTERPRETER_H_
+#define REMOTING_CLIENT_GESTURE_INTERPRETER_H_
+
+#include "remoting/client/desktop_viewport.h"
+
+namespace remoting {
+
+// This is a class for interpreting a raw touch input into actions like moving
+// the viewport and injecting mouse clicks.
+class GestureInterpreter {
+ public:
+ GestureInterpreter(
+ const DesktopViewport::TransformationCallback& on_transformation_changed);
+ ~GestureInterpreter();
+
+ // Coordinates of the OpenGL view surface will be used.
+ void Pinch(float pivot_x, float pivot_y, float scale);
+ void Pan(float translation_x, float translation_y);
+ void Tap(float x, float y);
+ void LongPress(float x, float y);
+
+ void OnSurfaceSizeChanged(int width, int height);
+ void OnDesktopSizeChanged(int width, int height);
+
+ private:
+ DesktopViewport viewport_;
+
+ // GestureInterpreter is neither copyable nor movable.
+ GestureInterpreter(const GestureInterpreter&) = delete;
+ GestureInterpreter& operator=(const GestureInterpreter&) = delete;
+};
+
+} // namespace remoting
+#endif // REMOTING_CLIENT_GESTURE_INTERPRETER_H_
« no previous file with comments | « remoting/client/BUILD.gn ('k') | remoting/client/gesture_interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698