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 bool InitializeHardware();
36 void ShutdownHardware();
37 intptr_t GetNativeDisplay();
39 gfx::Screen* CreateDesktopScreen();
40 const views::DesktopScreenWayland* GetPrimaryScreen() const;
42 gfx::AcceleratedWidget GetAcceleratedWidget();
43 gfx::AcceleratedWidget RealizeAcceleratedWidget(gfx::AcceleratedWidget w);
45 // OutputChangeObserver overrides.
46 virtual void OnOutputSizeChanged(unsigned width, unsigned height) OVERRIDE;
49 WaylandWindow* GetWidget(gfx::AcceleratedWidget w);
51 void LookAheadOutputGeometry();
53 static void DelayedInitialization(OzoneDisplay* display);
55 views::DesktopScreenWayland* desktop_screen_;
56 WaylandDisplay* display_;
57 OzoneDisplayChannel* channel_;
58 OzoneDisplayChannelHost* host_;
59 EventConverterOzoneWayland* event_converter_;
60 static OzoneDisplay* instance_;
61 DISALLOW_COPY_AND_ASSIGN(OzoneDisplay);
64 } // namespace ozonewayland
66 #endif // OZONE_IMPL_OZONE_DISPLAY_H_