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_OZONE_DISPLAY_H_
6 #define OZONE_IMPL_OZONE_DISPLAY_H_
8 #include "ozone/platform/ozone_export_wayland.h"
9 #include "ozone/ui/events/output_change_observer.h"
10 #include "ui/gfx/native_widget_types.h"
17 class DesktopScreenWayland;
20 namespace ozonewayland {
22 class EventConverterOzoneWayland;
23 class OzoneDisplayChannel;
24 class OzoneDisplayChannelHost;
28 class OZONE_WAYLAND_EXPORT OzoneDisplay : public OutputChangeObserver {
30 static OzoneDisplay* GetInstance();
33 virtual ~OzoneDisplay();
35 const char* DefaultDisplaySpec();
36 bool InitializeHardware();
37 void ShutdownHardware();
38 intptr_t GetNativeDisplay();
40 gfx::Screen* CreateDesktopScreen();
41 const views::DesktopScreenWayland* GetPrimaryScreen() const;
43 gfx::AcceleratedWidget GetAcceleratedWidget();
44 gfx::AcceleratedWidget RealizeAcceleratedWidget(gfx::AcceleratedWidget w);
46 // OutputChangeObserver overrides.
47 virtual void OnOutputSizeChanged(unsigned width, unsigned height) OVERRIDE;
50 WaylandWindow* GetWidget(gfx::AcceleratedWidget w);
52 void LookAheadOutputGeometry();
54 static void DelayedInitialization(OzoneDisplay* display);
56 views::DesktopScreenWayland* desktop_screen_;
57 WaylandDisplay* display_;
58 OzoneDisplayChannel* channel_;
59 OzoneDisplayChannelHost* host_;
60 EventConverterOzoneWayland* event_converter_;
62 static OzoneDisplay* instance_;
63 DISALLOW_COPY_AND_ASSIGN(OzoneDisplay);
66 } // namespace ozonewayland
68 #endif // OZONE_IMPL_OZONE_DISPLAY_H_