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

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

Issue 2897143002: [CRD iOS] Ignore touch event when the touch point is out of the canvas in direct input mode (Closed)
Patch Set: 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 | « no previous file | remoting/client/ui/desktop_viewport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DESKTOP_VIEWPORT_H_ 5 #ifndef REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_
6 #define REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_ 6 #define REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "remoting/client/ui/view_matrix.h" 9 #include "remoting/client/ui/view_matrix.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Moves the viewport center by <x, y> on the desktop's coordinate. 51 // Moves the viewport center by <x, y> on the desktop's coordinate.
52 void MoveViewport(float dx, float dy); 52 void MoveViewport(float dx, float dy);
53 53
54 // Sets the viewport center to (x, y) on the desktop's coordinate. 54 // Sets the viewport center to (x, y) on the desktop's coordinate.
55 void SetViewportCenter(float x, float y); 55 void SetViewportCenter(float x, float y);
56 56
57 // Returns the current center of the viewport on the desktop's coordinate. 57 // Returns the current center of the viewport on the desktop's coordinate.
58 ViewMatrix::Point GetViewportCenter() const; 58 ViewMatrix::Point GetViewportCenter() const;
59 59
60 // Returns true if |point| is within the bounds of the desktop.
61 bool IsPointWithinDesktopBounds(const ViewMatrix::Point& point) const;
62
60 // Constrains |point| within the bounds of the desktop. Do nothing if the 63 // Constrains |point| within the bounds of the desktop. Do nothing if the
61 // desktop size is not set. 64 // desktop size is not set.
62 ViewMatrix::Point ConstrainPointToDesktop( 65 ViewMatrix::Point ConstrainPointToDesktop(
63 const ViewMatrix::Point& point) const; 66 const ViewMatrix::Point& point) const;
64 67
65 // Registers the callback to be called once the transformation has changed. 68 // Registers the callback to be called once the transformation has changed.
66 // run_immediately: If true and the viewport is ready to be used, the callback 69 // run_immediately: If true and the viewport is ready to be used, the callback
67 // will be called immedately with the transformation matrix. 70 // will be called immedately with the transformation matrix.
68 void RegisterOnTransformationChangedCallback( 71 void RegisterOnTransformationChangedCallback(
69 const TransformationCallback& callback, 72 const TransformationCallback& callback,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 116
114 TransformationCallback on_transformation_changed_; 117 TransformationCallback on_transformation_changed_;
115 118
116 // DesktopViewport is neither copyable nor movable. 119 // DesktopViewport is neither copyable nor movable.
117 DesktopViewport(const DesktopViewport&) = delete; 120 DesktopViewport(const DesktopViewport&) = delete;
118 DesktopViewport& operator=(const DesktopViewport&) = delete; 121 DesktopViewport& operator=(const DesktopViewport&) = delete;
119 }; 122 };
120 123
121 } // namespace remoting 124 } // namespace remoting
122 #endif // REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_ 125 #endif // REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/ui/desktop_viewport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698