OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ |
6 #define UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ | 6 #define UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ |
7 | 7 |
8 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 8 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
9 #include "ui/gfx/ozone/dri/dri_surface_factory.h" | 9 #include "ui/gfx/ozone/dri/dri_surface_factory.h" |
10 #include "ui/ozone/ozone_platform.h" | 10 #include "ui/ozone/ozone_platform.h" |
11 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" | 11 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 // OzonePlatform for Linux DRI (Direct Rendering Infrastructure) | 15 // OzonePlatform for Linux DRI (Direct Rendering Infrastructure) |
16 // | 16 // |
17 // This platform is Linux without any display server (no X, wayland, or | 17 // This platform is Linux without any display server (no X, wayland, or |
18 // anything). This means chrome alone owns the display and input devices. | 18 // anything). This means chrome alone owns the display and input devices. |
19 class OzonePlatformDri : public OzonePlatform { | 19 class OzonePlatformDri : public OzonePlatform { |
20 public: | 20 public: |
21 OzonePlatformDri(); | 21 OzonePlatformDri(); |
22 virtual ~OzonePlatformDri(); | 22 virtual ~OzonePlatformDri(); |
23 | 23 |
24 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE; | 24 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE; |
25 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE; | 25 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE; |
26 virtual ui::InputMethodContextFactoryOzone* | 26 virtual ui::InputMethodContextFactoryOzone* |
27 GetInputMethodContextFactoryOzone() OVERRIDE; | 27 GetInputMethodContextFactoryOzone() OVERRIDE; |
28 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE; | 28 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE; |
| 29 #if defined(OS_CHROMEOS) |
| 30 virtual scoped_ptr<ui::NativeDisplayDelegate> |
| 31 CreateNativeDisplayDelegate() OVERRIDE; |
| 32 #endif |
29 | 33 |
30 private: | 34 private: |
31 gfx::DriSurfaceFactory surface_factory_ozone_; | 35 gfx::DriSurfaceFactory surface_factory_ozone_; |
32 ui::CursorFactoryEvdevDri cursor_factory_ozone_; | 36 ui::CursorFactoryEvdevDri cursor_factory_ozone_; |
33 ui::EventFactoryEvdev event_factory_ozone_; | 37 ui::EventFactoryEvdev event_factory_ozone_; |
34 // This creates a minimal input context. | 38 // This creates a minimal input context. |
35 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; | 39 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; |
36 | 40 |
37 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 41 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
38 }; | 42 }; |
39 | 43 |
40 // Constructor hook for use in ozone_platform_list.cc | 44 // Constructor hook for use in ozone_platform_list.cc |
41 OzonePlatform* CreateOzonePlatformDri(); | 45 OzonePlatform* CreateOzonePlatformDri(); |
42 | 46 |
43 } // namespace ui | 47 } // namespace ui |
44 | 48 |
45 #endif // UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ | 49 #endif // UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ |
OLD | NEW |