Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ozone / platform / ozone_platform_wayland.h
1 // Copyright (c) 2013 The Chromium Authors. 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_PLATFORM_OZONE_PLATFORM_WAYLAND_H_
6 #define OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_
7
8 #include "ozone/impl/desktop_factory_wayland.h"
9 #include "ozone/impl/ozone_display.h"
10 #include "ozone/impl/surface_factory_wayland.h"
11 #include "ozone/platform/ozone_export_wayland.h"
12 #include "ozone/ui/ime/input_method_context_factory_wayland.h"
13 #include "ui/events/ozone/event_factory_ozone.h"
14 #include "ui/ozone/ozone_platform.h"
15
16 namespace ui {
17
18 // OzonePlatform for Wayland
19 //
20 // This platform is Linux with the wayland display server.
21 class OzonePlatformWayland : public OzonePlatform {
22  public:
23   OzonePlatformWayland();
24   virtual ~OzonePlatformWayland();
25
26   virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE;
27   virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE;
28   virtual ui::InputMethodContextFactoryOzone*
29       GetInputMethodContextFactoryOzone() OVERRIDE;
30
31  private:
32   ozonewayland::OzoneDisplay display_;
33   ozonewayland::SurfaceFactoryWayland surface_factory_ozone_;
34
35   // TODO(kalyan): Use EventFactoryOzone. This is a stub that does nothing.
36   ui::EventFactoryOzone event_factory_ozone_;
37
38   ozonewayland::InputMethodContextFactoryWayland input_method_context_factory_;
39
40 #if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
41   views::DesktopFactoryWayland desktop_factory_ozone_;
42 #endif
43
44   DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland);
45 };
46
47 // Constructor hook for use in ozone_platform_list.cc
48 OZONE_WAYLAND_EXPORT OzonePlatform* CreateOzonePlatformWayland();
49
50 }  // namespace ui
51
52 #endif  // OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_