1 // Copyright 2013 Intel Corporation. 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 OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__
6 #define OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__
10 #include "ozone/ui/events/output_change_observer.h"
11 #include "ui/gfx/display_change_notifier.h"
12 #include "ui/gfx/screen.h"
20 class DesktopScreenWayland : public gfx::Screen,
21 public ui::OutputChangeObserver {
23 DesktopScreenWayland();
24 virtual ~DesktopScreenWayland();
26 // OutputChangeObserver overrides.
27 void OnOutputSizeChanged(unsigned width, unsigned height) override;
30 void SetGeometry(const gfx::Rect& geometry);
31 // Overridden from gfx::Screen:
32 gfx::Point GetCursorScreenPoint() override;
33 gfx::NativeWindow GetWindowUnderCursor() override;
34 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
35 int GetNumDisplays() const override;
36 std::vector<gfx::Display> GetAllDisplays() const override;
37 gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const override;
38 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
39 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
40 gfx::Display GetPrimaryDisplay() const override;
41 void AddObserver(gfx::DisplayObserver* observer) override;
42 void RemoveObserver(gfx::DisplayObserver* observer) override;
45 gfx::DisplayChangeNotifier change_notifier_;
47 // The display objects we present to chrome.
48 std::vector<gfx::Display> displays_;
49 DISALLOW_COPY_AND_ASSIGN(DesktopScreenWayland);
54 #endif // OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__