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