OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/ozone/platform/dri/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <gbm.h> |
8 #include <stdlib.h> | 9 #include <stdlib.h> |
9 #include <gbm.h> | |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | |
13 #include "ui/events/ozone/device/device_manager.h" | 12 #include "ui/events/ozone/device/device_manager.h" |
14 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 13 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
15 #include "ui/ozone/ozone_platform.h" | 14 #include "ui/ozone/ozone_platform.h" |
16 #include "ui/ozone/platform/dri/dri_wrapper.h" | 15 #include "ui/ozone/platform/dri/dri_wrapper.h" |
17 #include "ui/ozone/platform/dri/gbm_surface.h" | 16 #include "ui/ozone/platform/dri/gbm_surface.h" |
18 #include "ui/ozone/platform/dri/gbm_surface_factory.h" | 17 #include "ui/ozone/platform/dri/gbm_surface_factory.h" |
19 #include "ui/ozone/platform/dri/scanout_surface.h" | 18 #include "ui/ozone/platform/dri/scanout_surface.h" |
20 #include "ui/ozone/platform/dri/screen_manager.h" | 19 #include "ui/ozone/platform/dri/screen_manager.h" |
21 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" | 20 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" |
| 21 #include "ui/ozone/public/cursor_factory_ozone.h" |
22 | 22 |
23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
24 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" | 24 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
25 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" | 25 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" |
26 #endif | 26 #endif |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 30 matching lines...) Expand all Loading... |
62 | 62 |
63 class OzonePlatformGbm : public OzonePlatform { | 63 class OzonePlatformGbm : public OzonePlatform { |
64 public: | 64 public: |
65 OzonePlatformGbm() { | 65 OzonePlatformGbm() { |
66 base::AtExitManager::RegisterTask( | 66 base::AtExitManager::RegisterTask( |
67 base::Bind(&base::DeletePointer<OzonePlatformGbm>, this)); | 67 base::Bind(&base::DeletePointer<OzonePlatformGbm>, this)); |
68 } | 68 } |
69 virtual ~OzonePlatformGbm() {} | 69 virtual ~OzonePlatformGbm() {} |
70 | 70 |
71 // OzonePlatform: | 71 // OzonePlatform: |
72 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE { | 72 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE { |
73 return surface_factory_ozone_.get(); | 73 return surface_factory_ozone_.get(); |
74 } | 74 } |
75 virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { | 75 virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { |
76 return event_factory_ozone_.get(); | 76 return event_factory_ozone_.get(); |
77 } | 77 } |
78 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { | 78 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { |
79 return cursor_factory_ozone_.get(); | 79 return cursor_factory_ozone_.get(); |
80 } | 80 } |
81 #if defined(OS_CHROMEOS) | 81 #if defined(OS_CHROMEOS) |
82 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() | 82 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 124 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace | 129 } // namespace |
130 | 130 |
131 OzonePlatform* CreateOzonePlatformGbm() { return new OzonePlatformGbm; } | 131 OzonePlatform* CreateOzonePlatformGbm() { return new OzonePlatformGbm; } |
132 | 132 |
133 } // namespace ui | 133 } // namespace ui |
OLD | NEW |