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

Unified Diff: remoting/client/ui/desktop_viewport.h

Issue 2891603002: [CRD iOS] Trackpad Input Mode (Closed)
Patch Set: Fix 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
« no previous file with comments | « remoting/client/ui/BUILD.gn ('k') | remoting/client/ui/desktop_viewport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ui/desktop_viewport.h
diff --git a/remoting/client/ui/desktop_viewport.h b/remoting/client/ui/desktop_viewport.h
index 188574b06d8320cc94185631c53cb5f00cfe3d15..56c1a69f30879ad753062e130464d7e7379718da 100644
--- a/remoting/client/ui/desktop_viewport.h
+++ b/remoting/client/ui/desktop_viewport.h
@@ -54,6 +54,14 @@ class DesktopViewport {
// Sets the viewport center to (x, y) on the desktop's coordinate.
void SetViewportCenter(float x, float y);
+ // Returns the current center of the viewport on the desktop's coordinate.
+ ViewMatrix::Point GetViewportCenter() const;
+
+ // Constrains |point| within the bounds of the desktop. Do nothing if the
+ // desktop size is not set.
+ ViewMatrix::Point ConstrainPointToDesktop(
+ const ViewMatrix::Point& point) const;
+
// Registers the callback to be called once the transformation has changed.
// run_immediately: If true and the viewport is ready to be used, the callback
// will be called immedately with the transformation matrix.
@@ -88,9 +96,6 @@ class DesktopViewport {
// locate.
Bounds GetViewportCenterBounds() const;
- // Returns the current center of the viewport on the desktop's coordinate.
- ViewMatrix::Point GetViewportCenter() const;
-
// Translates the viewport on the desktop's reference frame by <dx, dy>,
// without calling UpdateViewport().
void MoveViewportWithoutUpdate(float dx, float dy);
« no previous file with comments | « remoting/client/ui/BUILD.gn ('k') | remoting/client/ui/desktop_viewport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698