1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_MOJO_INIT_SCREEN_MOJO_H_
6 #define UI_MOJO_INIT_SCREEN_MOJO_H_
8 #include "ui/gfx/display.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/screen.h"
15 class ScreenMojo
: public gfx::Screen
{
17 ScreenMojo(const gfx::Size
& screen_size_in_pixels
, float device_pixel_ratio
);
20 gfx::Point
GetCursorScreenPoint() override
;
21 gfx::NativeWindow
GetWindowUnderCursor() override
;
22 gfx::NativeWindow
GetWindowAtScreenPoint(const gfx::Point
& point
) override
;
23 gfx::Display
GetPrimaryDisplay() const override
;
24 gfx::Display
GetDisplayNearestWindow(gfx::NativeView view
) const override
;
25 gfx::Display
GetDisplayNearestPoint(const gfx::Point
& point
) const override
;
26 int GetNumDisplays() const override
;
27 std::vector
<gfx::Display
> GetAllDisplays() const override
;
28 gfx::Display
GetDisplayMatching(const gfx::Rect
& match_rect
) const override
;
29 void AddObserver(gfx::DisplayObserver
* observer
) override
;
30 void RemoveObserver(gfx::DisplayObserver
* observer
) override
;
33 const gfx::Size screen_size_in_pixels_
;
34 const float device_pixel_ratio_
;
36 gfx::Display display_
;
38 DISALLOW_COPY_AND_ASSIGN(ScreenMojo
);
44 #endif // UI_MOJO_INIT_SCREEN_MOJO_H_