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

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

Issue 2866843002: [Remoting Client] Always ResizeToFit when desktop/surface size is changed (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 | « no previous file | remoting/client/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_DESKTOP_VIEWPORT_H_ 5 #ifndef REMOTING_CLIENT_DESKTOP_VIEWPORT_H_
6 #define REMOTING_CLIENT_DESKTOP_VIEWPORT_H_ 6 #define REMOTING_CLIENT_DESKTOP_VIEWPORT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "remoting/client/view_matrix.h" 9 #include "remoting/client/view_matrix.h"
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Translates the viewport on the desktop's reference frame by <dx, dy>, 88 // Translates the viewport on the desktop's reference frame by <dx, dy>,
89 // without calling UpdateViewport(). 89 // without calling UpdateViewport().
90 void MoveViewportCenterWithoutUpdate(float dx, float dy); 90 void MoveViewportCenterWithoutUpdate(float dx, float dy);
91 91
92 // Moves the point inside the bounds with minimum displacement if it is out of 92 // Moves the point inside the bounds with minimum displacement if it is out of
93 // the bounds. 93 // the bounds.
94 static ViewMatrix::Point ConstrainPointToBounds( 94 static ViewMatrix::Point ConstrainPointToBounds(
95 const Bounds& bounds, 95 const Bounds& bounds,
96 const ViewMatrix::Point& point); 96 const ViewMatrix::Point& point);
97 97
98 ViewMatrix::Vector2D desktop_size_; 98 ViewMatrix::Vector2D desktop_size_{0.f, 0.f};
99 ViewMatrix::Vector2D surface_size_; 99 ViewMatrix::Vector2D surface_size_{0.f, 0.f};
100
101 bool desktop_size_ready_ = false;
102 bool surface_size_ready_ = false;
103 100
104 ViewMatrix desktop_to_surface_transform_; 101 ViewMatrix desktop_to_surface_transform_;
105 102
106 TransformationCallback on_transformation_changed_; 103 TransformationCallback on_transformation_changed_;
107 104
108 // DesktopViewport is neither copyable nor movable. 105 // DesktopViewport is neither copyable nor movable.
109 DesktopViewport(const DesktopViewport&) = delete; 106 DesktopViewport(const DesktopViewport&) = delete;
110 DesktopViewport& operator=(const DesktopViewport&) = delete; 107 DesktopViewport& operator=(const DesktopViewport&) = delete;
111 }; 108 };
112 109
113 } // namespace remoting 110 } // namespace remoting
114 #endif // REMOTING_CLIENT_DESKTOP_VIEWPORT_H_ 111 #endif // REMOTING_CLIENT_DESKTOP_VIEWPORT_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/desktop_viewport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698