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 #include "ui/ozone/platform/dri/ozone_platform_dri.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
9 #include "ui/events/ozone/device/device_manager.h" | 9 #include "ui/events/ozone/device/device_manager.h" |
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
11 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 11 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 12 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
| 13 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
12 #include "ui/ozone/platform/dri/display_manager.h" | 14 #include "ui/ozone/platform/dri/display_manager.h" |
13 #include "ui/ozone/platform/dri/dri_buffer.h" | 15 #include "ui/ozone/platform/dri/dri_buffer.h" |
14 #include "ui/ozone/platform/dri/dri_cursor.h" | 16 #include "ui/ozone/platform/dri/dri_cursor.h" |
15 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" | 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
16 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" | 18 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" |
17 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 19 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
18 #include "ui/ozone/platform/dri/dri_window.h" | 20 #include "ui/ozone/platform/dri/dri_window.h" |
19 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" | 21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" |
20 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" | 22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" |
21 #include "ui/ozone/platform/dri/dri_window_manager.h" | 23 #include "ui/ozone/platform/dri/dri_window_manager.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 scoped_ptr<NativeDisplayDelegateDri> ndd( | 92 scoped_ptr<NativeDisplayDelegateDri> ndd( |
91 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get())); | 93 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get())); |
92 ndd->Initialize(); | 94 ndd->Initialize(); |
93 gpu_platform_support_.reset( | 95 gpu_platform_support_.reset( |
94 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_, | 96 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_, |
95 screen_manager_.get(), ndd.Pass())); | 97 screen_manager_.get(), ndd.Pass())); |
96 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 98 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
97 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 99 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
98 window_manager_.reset( | 100 window_manager_.reset( |
99 new DriWindowManager(gpu_platform_support_host_.get())); | 101 new DriWindowManager(gpu_platform_support_host_.get())); |
100 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), | 102 KeyboardLayoutEngineManager::Create( |
101 device_manager_.get())); | 103 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
| 104 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 105 window_manager_->cursor(), device_manager_.get(), |
| 106 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
102 if (surface_factory_ozone_->InitializeHardware() != | 107 if (surface_factory_ozone_->InitializeHardware() != |
103 DriSurfaceFactory::INITIALIZED) | 108 DriSurfaceFactory::INITIALIZED) |
104 LOG(FATAL) << "Failed to initialize display hardware."; | 109 LOG(FATAL) << "Failed to initialize display hardware."; |
105 | 110 |
106 if (!ui_thread_gpu_.Initialize()) | 111 if (!ui_thread_gpu_.Initialize()) |
107 LOG(FATAL) << "Failed to initialize dummy channel."; | 112 LOG(FATAL) << "Failed to initialize dummy channel."; |
108 } | 113 } |
109 | 114 |
110 void InitializeGPU() override {} | 115 void InitializeGPU() override {} |
111 | 116 |
(...skipping 15 matching lines...) Expand all Loading... |
127 | 132 |
128 DriWindowDelegateManager window_delegate_manager_; | 133 DriWindowDelegateManager window_delegate_manager_; |
129 | 134 |
130 UiThreadGpu ui_thread_gpu_; | 135 UiThreadGpu ui_thread_gpu_; |
131 | 136 |
132 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 137 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
133 }; | 138 }; |
134 | 139 |
135 } // namespace | 140 } // namespace |
136 | 141 |
137 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 142 OzonePlatform* CreateOzonePlatformDri() { |
| 143 return new OzonePlatformDri; |
| 144 } |
138 | 145 |
139 } // namespace ui | 146 } // namespace ui |
OLD | NEW |