| Index: components/exo/display.h
|
| diff --git a/components/exo/display.h b/components/exo/display.h
|
| index d4f3b3d08065b522f902612fe7fabe6c23a806de..f841c94e74c21568f6c0ff5f04ad428e6ef09307 100644
|
| --- a/components/exo/display.h
|
| +++ b/components/exo/display.h
|
| @@ -12,6 +12,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/shared_memory_handle.h"
|
| +#include "ui/gfx/geometry/point.h"
|
|
|
| #if defined(USE_OZONE)
|
| #include "base/files/scoped_file.h"
|
| @@ -20,10 +21,6 @@
|
| #include "ui/gfx/native_pixmap_handle.h"
|
| #endif
|
|
|
| -namespace gfx {
|
| -class Point;
|
| -}
|
| -
|
| namespace exo {
|
| class NotificationSurface;
|
| class NotificationSurfaceManager;
|
| @@ -45,6 +42,20 @@ class Display {
|
| explicit Display(NotificationSurfaceManager* notification_surface_manager);
|
| ~Display();
|
|
|
| + void set_virtual_origin(const gfx::Point& virtual_origin) {
|
| + virtual_origin_ = virtual_origin;
|
| + }
|
| +
|
| + template <typename Point>
|
| + void ConvertFromVirtualToScreen(Point* point) const {
|
| + *point += virtual_origin_.OffsetFromOrigin();
|
| + }
|
| +
|
| + template <typename Point>
|
| + void ConvertFromScreenToVirtual(Point* point) const {
|
| + *point -= virtual_origin_.OffsetFromOrigin();
|
| + }
|
| +
|
| // Creates a new surface.
|
| std::unique_ptr<Surface> CreateSurface();
|
|
|
| @@ -88,6 +99,9 @@ class Display {
|
| const std::string& notification_id);
|
|
|
| private:
|
| + // Origin of the virtual screen relative to the primary display.
|
| + gfx::Point virtual_origin_;
|
| +
|
| NotificationSurfaceManager* const notification_surface_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Display);
|
|
|