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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 gpu_platform_support_.reset(new DriGpuPlatformSupport( | 89 gpu_platform_support_.reset(new DriGpuPlatformSupport( |
88 dri_.get(), &window_delegate_manager_, screen_manager_.get(), | 90 dri_.get(), &window_delegate_manager_, screen_manager_.get(), |
89 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri( | 91 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri( |
90 dri_.get(), screen_manager_.get(), NULL)))); | 92 dri_.get(), screen_manager_.get(), NULL)))); |
91 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 93 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
92 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 94 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
93 window_manager_.reset( | 95 window_manager_.reset( |
94 new DriWindowManager(gpu_platform_support_host_.get())); | 96 new DriWindowManager(gpu_platform_support_host_.get())); |
95 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), | 97 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), |
96 device_manager_.get())); | 98 device_manager_.get())); |
| 99 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
| 100 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
97 if (surface_factory_ozone_->InitializeHardware() != | 101 if (surface_factory_ozone_->InitializeHardware() != |
98 DriSurfaceFactory::INITIALIZED) | 102 DriSurfaceFactory::INITIALIZED) |
99 LOG(FATAL) << "Failed to initialize display hardware."; | 103 LOG(FATAL) << "Failed to initialize display hardware."; |
100 | 104 |
101 if (!ui_thread_gpu_.Initialize()) | 105 if (!ui_thread_gpu_.Initialize()) |
102 LOG(FATAL) << "Failed to initialize dummy channel."; | 106 LOG(FATAL) << "Failed to initialize dummy channel."; |
103 } | 107 } |
104 | 108 |
105 void InitializeGPU() override {} | 109 void InitializeGPU() override {} |
106 | 110 |
(...skipping 15 matching lines...) Expand all Loading... |
122 | 126 |
123 DriWindowDelegateManager window_delegate_manager_; | 127 DriWindowDelegateManager window_delegate_manager_; |
124 | 128 |
125 UiThreadGpu ui_thread_gpu_; | 129 UiThreadGpu ui_thread_gpu_; |
126 | 130 |
127 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 131 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
128 }; | 132 }; |
129 | 133 |
130 } // namespace | 134 } // namespace |
131 | 135 |
132 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 136 OzonePlatform* CreateOzonePlatformDri() { |
| 137 return new OzonePlatformDri; |
| 138 } |
133 | 139 |
134 } // namespace ui | 140 } // namespace ui |
OLD | NEW |