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

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

Issue 2909703002: [CRD iOS] Preserve viewport state when toggling the soft keyboard (Closed)
Patch Set: Merge ToT Created 3 years, 6 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 17 matching lines...) Expand all
28 // You may either manipulate the desktop on the surface coordinate or manipulate 28 // You may either manipulate the desktop on the surface coordinate or manipulate
29 // the viewport on the desktop coordinate, depending on your choice of the 29 // the viewport on the desktop coordinate, depending on your choice of the
30 // reference frame. 30 // reference frame.
31 class DesktopViewport { 31 class DesktopViewport {
32 public: 32 public:
33 using TransformationCallback = base::Callback<void(const ViewMatrix&)>; 33 using TransformationCallback = base::Callback<void(const ViewMatrix&)>;
34 34
35 DesktopViewport(); 35 DesktopViewport();
36 ~DesktopViewport(); 36 ~DesktopViewport();
37 37
38 // Sets the |desktop_size_| and initializes the viewport when necessary. 38 // Sets the |desktop_size_| and (re)initializes the viewport.
39 void SetDesktopSize(int desktop_width, int desktop_height); 39 void SetDesktopSize(int desktop_width, int desktop_height);
40 40
41 // Sets the |surface_size_| and initializes the viewport when necessary. 41 // Sets the |surface_size_| and (re)initializes the viewport if both
42 // dimensions are changed.
42 void SetSurfaceSize(int surface_width, int surface_height); 43 void SetSurfaceSize(int surface_width, int surface_height);
43 44
44 // Translates the desktop on the surface's reference frame by <dx, dy>. 45 // Translates the desktop on the surface's reference frame by <dx, dy>.
45 void MoveDesktop(float dx, float dy); 46 void MoveDesktop(float dx, float dy);
46 47
47 // Scales the desktop on the surface's reference frame at pivot point (px, py) 48 // Scales the desktop on the surface's reference frame at pivot point (px, py)
48 // by |scale|. 49 // by |scale|.
49 void ScaleDesktop(float px, float py, float scale); 50 void ScaleDesktop(float px, float py, float scale);
50 51
51 // Moves the viewport center by <x, y> on the desktop's coordinate. 52 // Moves the viewport center by <x, y> on the desktop's coordinate.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 117
117 TransformationCallback on_transformation_changed_; 118 TransformationCallback on_transformation_changed_;
118 119
119 // DesktopViewport is neither copyable nor movable. 120 // DesktopViewport is neither copyable nor movable.
120 DesktopViewport(const DesktopViewport&) = delete; 121 DesktopViewport(const DesktopViewport&) = delete;
121 DesktopViewport& operator=(const DesktopViewport&) = delete; 122 DesktopViewport& operator=(const DesktopViewport&) = delete;
122 }; 123 };
123 124
124 } // namespace remoting 125 } // namespace remoting
125 #endif // REMOTING_CLIENT_UI_DESKTOP_VIEWPORT_H_ 126 #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