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

Unified Diff: remoting/client/desktop_viewport.cc

Issue 2862893003: [CRD iOS] Inject mouse events to the host (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
Index: remoting/client/desktop_viewport.cc
diff --git a/remoting/client/desktop_viewport.cc b/remoting/client/desktop_viewport.cc
index f1b3dda978bd0dc1910ea90a3914b3fca7392fad..3f4e891a51fed282b4fda128e23e2ad53aacbc7c 100644
--- a/remoting/client/desktop_viewport.cc
+++ b/remoting/client/desktop_viewport.cc
@@ -54,10 +54,14 @@ void DesktopViewport::ScaleDesktop(float px, float py, float scale) {
UpdateViewport();
}
+void DesktopViewport::MoveViewportCenter(float dx, float dy) {
+ MoveViewportCenterWithoutUpdate(dx, dy);
+ UpdateViewport();
+}
+
void DesktopViewport::SetViewportCenter(float x, float y) {
ViewMatrix::Point old_center = GetViewportCenter();
- MoveViewportCenterWithoutUpdate(x - old_center.x, y - old_center.y);
- UpdateViewport();
+ MoveViewportCenter(x - old_center.x, y - old_center.y);
}
void DesktopViewport::RegisterOnTransformationChangedCallback(
@@ -69,6 +73,10 @@ void DesktopViewport::RegisterOnTransformationChangedCallback(
}
}
+const ViewMatrix& DesktopViewport::GetTransformation() const {
+ return desktop_to_surface_transform_;
+}
+
void DesktopViewport::ResizeToFit() {
DCHECK(IsViewportReady());

Powered by Google App Engine
This is Rietveld 408576698