Chromium Code Reviews| Index: ui/ozone/platform/wayland/wayland_display.h |
| diff --git a/ui/ozone/platform/wayland/wayland_display.h b/ui/ozone/platform/wayland/wayland_display.h |
| index d63945a8a69050d9af00fc92489600ac0ddede6b..bdcf33ef671ae845d96f112259e0f61dfb1cac18 100644 |
| --- a/ui/ozone/platform/wayland/wayland_display.h |
| +++ b/ui/ozone/platform/wayland/wayland_display.h |
| @@ -12,6 +12,7 @@ |
| #include "ui/gfx/native_widget_types.h" |
| #include "ui/ozone/platform/wayland/wayland_object.h" |
| #include "ui/ozone/platform/wayland/wayland_pointer.h" |
| +#include "ui/ozone/platform/wayland/wayland_screen.h" |
| namespace ui { |
| @@ -23,6 +24,7 @@ class WaylandDisplay : public PlatformEventSource, |
| WaylandDisplay(); |
| ~WaylandDisplay() override; |
| + static WaylandDisplay* GetInstance() { return instance_; } |
| bool Initialize(); |
| bool StartProcessingEvents(); |
| @@ -38,6 +40,12 @@ class WaylandDisplay : public PlatformEventSource, |
| void AddWindow(gfx::AcceleratedWidget widget, WaylandWindow* window); |
| void RemoveWindow(gfx::AcceleratedWidget widget); |
| + const std::vector<WaylandScreen*>& GetScreenList() const; |
| + WaylandScreen* PrimaryScreen() const { return primary_screen_; } |
|
tonikitoo
2016/06/06 21:35:15
Minor: For the purposes of a simple API, I believ
joone
2016/06/07 22:27:00
Done.
|
| + void OutputSizeChanged(int32_t name, unsigned width, unsigned height); |
| + |
| + void SetOutputCompleteClosure(const base::Closure&); |
| + |
| private: |
| void Flush(); |
| void DispatchUiEvent(Event* event); |
| @@ -65,6 +73,7 @@ class WaylandDisplay : public PlatformEventSource, |
| static void Ping(void* data, xdg_shell* shell, uint32_t serial); |
| std::map<gfx::AcceleratedWidget, WaylandWindow*> window_map_; |
| + static WaylandDisplay* instance_; |
| wl::Object<wl_display> display_; |
| wl::Object<wl_registry> registry_; |
| @@ -79,6 +88,11 @@ class WaylandDisplay : public PlatformEventSource, |
| bool watching_ = false; |
| base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
| + WaylandScreen* primary_screen_; |
| + std::vector<WaylandScreen*> screen_list_; |
| + |
| + base::Closure output_complete_closure_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(WaylandDisplay); |
| }; |