#include "ozone/platform/ozone_platform_wayland.h"
-namespace ui {
-
-OzonePlatformWayland::OzonePlatformWayland() {}
-
-OzonePlatformWayland::~OzonePlatformWayland() {}
+#include "ozone/ui/cursor/cursor_factory_ozone_wayland.h"
+#if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
+#include "ozone/ui/desktop_aura/desktop_factory_wayland.h"
+#endif
+#include "ozone/ui/events/event_factory_ozone_wayland.h"
+#include "ozone/ui/ime/input_method_context_factory_wayland.h"
+#include "ozone/wayland/display.h"
+#include "ui/base/cursor/ozone/cursor_factory_ozone.h"
+#include "ui/ozone/ozone_platform.h"
-gfx::SurfaceFactoryOzone* OzonePlatformWayland::GetSurfaceFactoryOzone() {
- return &surface_factory_ozone_;
-}
-
-ui::EventFactoryOzone* OzonePlatformWayland::GetEventFactoryOzone() {
- return &event_factory_ozone_;
-}
-
-ui::InputMethodContextFactoryOzone*
-OzonePlatformWayland::GetInputMethodContextFactoryOzone() {
- return &input_method_context_factory_;
-}
+namespace ui {
-ui::CursorFactoryOzone* OzonePlatformWayland::GetCursorFactoryOzone() {
- return &cursor_factory_ozone_;
-}
+namespace {
+
+// OzonePlatform for Wayland
+//
+// This platform is Linux with the Wayland display server.
+class OzonePlatformWayland : public OzonePlatform {
+ public:
+ OzonePlatformWayland() {}
+
+ virtual ~OzonePlatformWayland() {}
+
+ // OzonePlatform:
+ virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ return &wayland_display_;
+ }
+ virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE {
+ return &event_factory_ozone_;
+ }
+ virtual ui::InputMethodContextFactoryOzone*
+ GetInputMethodContextFactoryOzone() OVERRIDE {
+ return &input_method_context_factory_;
+ }
+ virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ return &cursor_factory_ozone_;
+ }
+
+ private:
+ ozonewayland::WaylandDisplay wayland_display_;
+ ui::EventFactoryOzoneWayland event_factory_ozone_;
+ ui::InputMethodContextFactoryWayland input_method_context_factory_;
+ ui::CursorFactoryOzoneWayland cursor_factory_ozone_;
+#if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
+ views::DesktopFactoryWayland desktop_factory_ozone_;
+#endif
+ DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland);
+};
+
+} // namespace
OzonePlatform* CreateOzonePlatformWayland() { return new OzonePlatformWayland; }