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 "base/thread_task_runner_handle.h" |
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
9 #include "ui/events/ozone/device/device_manager.h" | 10 #include "ui/events/ozone/device/device_manager.h" |
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 11 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
11 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 12 #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/keyboard_layout_engine_manager.h" |
13 #include "ui/ozone/platform/dri/display_manager.h" | 14 #include "ui/ozone/platform/dri/display_manager.h" |
14 #include "ui/ozone/platform/dri/dri_buffer.h" | 15 #include "ui/ozone/platform/dri/dri_buffer.h" |
15 #include "ui/ozone/platform/dri/dri_cursor.h" | 16 #include "ui/ozone/platform/dri/dri_cursor.h" |
16 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" | 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
17 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" | 18 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" |
(...skipping 94 matching lines...) Loading... |
112 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( | 113 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( |
113 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); | 114 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); |
114 #else | 115 #else |
115 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( | 116 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
116 make_scoped_ptr(new StubKeyboardLayoutEngine())); | 117 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
117 #endif | 118 #endif |
118 event_factory_ozone_.reset(new EventFactoryEvdev( | 119 event_factory_ozone_.reset(new EventFactoryEvdev( |
119 cursor_.get(), device_manager_.get(), | 120 cursor_.get(), device_manager_.get(), |
120 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); | 121 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
121 | 122 |
122 if (!ui_thread_gpu_.Initialize()) | 123 if (!ui_thread_gpu_.Initialize(base::ThreadTaskRunnerHandle::Get(), |
| 124 base::ThreadTaskRunnerHandle::Get())) |
123 LOG(FATAL) << "Failed to initialize dummy channel."; | 125 LOG(FATAL) << "Failed to initialize dummy channel."; |
124 } | 126 } |
125 | 127 |
126 void InitializeGPU() override {} | 128 void InitializeGPU() override {} |
127 | 129 |
128 private: | 130 private: |
129 scoped_refptr<DriWrapper> dri_; | 131 scoped_refptr<DriWrapper> dri_; |
130 scoped_ptr<DrmDeviceManager> drm_device_manager_; | 132 scoped_ptr<DrmDeviceManager> drm_device_manager_; |
131 scoped_ptr<DriBufferGenerator> buffer_generator_; | 133 scoped_ptr<DriBufferGenerator> buffer_generator_; |
132 scoped_ptr<ScreenManager> screen_manager_; | 134 scoped_ptr<ScreenManager> screen_manager_; |
(...skipping 21 matching lines...) Loading... |
154 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 156 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
155 }; | 157 }; |
156 | 158 |
157 } // namespace | 159 } // namespace |
158 | 160 |
159 OzonePlatform* CreateOzonePlatformDri() { | 161 OzonePlatform* CreateOzonePlatformDri() { |
160 return new OzonePlatformDri; | 162 return new OzonePlatformDri; |
161 } | 163 } |
162 | 164 |
163 } // namespace ui | 165 } // namespace ui |
OLD | NEW |