Chromium Code Reviews| Index: remoting/client/viewport_geometry.h |
| diff --git a/remoting/client/viewport_geometry.h b/remoting/client/viewport_geometry.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3ae4e4580d9cede034d7f3fceb4cd669bfbf29e |
| --- /dev/null |
| +++ b/remoting/client/viewport_geometry.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_CLIENT_VIEWPORT_GEOMETRY_H_ |
| +#define REMOTING_CLIENT_VIEWPORT_GEOMETRY_H_ |
| + |
| +#include <array> |
|
joedow
2017/04/28 21:29:53
I don't think you use array here
Yuwei
2017/04/28 23:53:41
Obsolete. File deleted.
|
| + |
| +namespace remoting { |
| + |
| +struct Vector2D { |
| + float x; |
| + float y; |
| +}; |
|
joedow
2017/04/28 21:29:53
I wonder if these should be public types exposed v
Yuwei
2017/04/28 23:53:41
Moved into ViewMatrix.
|
| + |
| +// Same as Vector2D. This alias just serves as a context hint. |
| +using Point = Vector2D; |
| + |
| +struct Bounds { |
| + float left; |
| + float right; |
| + float top; |
| + float bottom; |
| +}; |
| + |
| +// Moves the point inside the bounds with minimum displacement if it is out of |
| +// the bounds. |
| +Point ConstrainPointToBounds(const Bounds& bounds, const Point& point); |
|
joedow
2017/04/28 21:29:53
This is only used in DesktopView so move it into a
Yuwei
2017/04/28 23:53:41
Moved into DesktopViewport
|
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_CLIENT_VIEWPORT_GEOMETRY_H_ |