Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / desktop_aura / desktop_screen_wayland.h
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.
4
5 #ifndef OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__
6 #define OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__
7
8 #include <vector>
9
10 #include "ozone/ui/events/output_change_observer.h"
11 #include "ui/gfx/display_change_notifier.h"
12 #include "ui/gfx/screen.h"
13
14 namespace aura {
15 class Window;
16 }
17
18 namespace views {
19
20 class DesktopScreenWayland : public gfx::Screen,
21                              public ui::OutputChangeObserver {
22  public:
23   DesktopScreenWayland();
24   virtual ~DesktopScreenWayland();
25
26   // OutputChangeObserver overrides.
27   void OnOutputSizeChanged(unsigned width, unsigned height) override;
28
29  private:
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;
43
44   gfx::Rect rect_;
45   gfx::DisplayChangeNotifier change_notifier_;
46
47   // The display objects we present to chrome.
48   std::vector<gfx::Display> displays_;
49   DISALLOW_COPY_AND_ASSIGN(DesktopScreenWayland);
50 };
51
52 }  // namespace views
53
54 #endif  // OZONE_IMPL_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H__