| 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/events/ozone/device/device_manager.h" | 8 #include "ui/events/ozone/device/device_manager.h" |
| 9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 new TouchscreenDeviceManagerOzone()); | 96 new TouchscreenDeviceManagerOzone()); |
| 97 } | 97 } |
| 98 #endif | 98 #endif |
| 99 virtual void InitializeUI() OVERRIDE { | 99 virtual void InitializeUI() OVERRIDE { |
| 100 surface_factory_ozone_.reset( | 100 surface_factory_ozone_.reset( |
| 101 new DriSurfaceFactory(dri_.get(), screen_manager_.get())); | 101 new DriSurfaceFactory(dri_.get(), screen_manager_.get())); |
| 102 cursor_factory_ozone_.reset( | 102 cursor_factory_ozone_.reset( |
| 103 new CursorFactoryEvdevDri(surface_factory_ozone_.get())); | 103 new CursorFactoryEvdevDri(surface_factory_ozone_.get())); |
| 104 event_factory_ozone_.reset(new EventFactoryEvdev( | 104 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 105 cursor_factory_ozone_.get(), device_manager_.get())); | 105 cursor_factory_ozone_.get(), device_manager_.get())); |
| 106 if (surface_factory_ozone_->InitializeHardware() != |
| 107 DriSurfaceFactory::INITIALIZED) |
| 108 LOG(FATAL) << "failed to initialize display hardware"; |
| 109 |
| 106 } | 110 } |
| 107 | 111 |
| 108 virtual void InitializeGPU() OVERRIDE {} | 112 virtual void InitializeGPU() OVERRIDE {} |
| 109 | 113 |
| 110 private: | 114 private: |
| 111 scoped_ptr<VirtualTerminalManager> vt_manager_; | 115 scoped_ptr<VirtualTerminalManager> vt_manager_; |
| 112 scoped_ptr<DriWrapper> dri_; | 116 scoped_ptr<DriWrapper> dri_; |
| 113 scoped_ptr<DriSurfaceGenerator> surface_generator_; | 117 scoped_ptr<DriSurfaceGenerator> surface_generator_; |
| 114 scoped_ptr<ScreenManager> screen_manager_; | 118 scoped_ptr<ScreenManager> screen_manager_; |
| 115 scoped_ptr<DeviceManager> device_manager_; | 119 scoped_ptr<DeviceManager> device_manager_; |
| 116 | 120 |
| 117 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_; | 121 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_; |
| 118 scoped_ptr<CursorFactoryEvdevDri> cursor_factory_ozone_; | 122 scoped_ptr<CursorFactoryEvdevDri> cursor_factory_ozone_; |
| 119 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 123 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
| 120 | 124 |
| 121 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 125 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 122 }; | 126 }; |
| 123 | 127 |
| 124 } // namespace | 128 } // namespace |
| 125 | 129 |
| 126 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 130 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } |
| 127 | 131 |
| 128 } // namespace ui | 132 } // namespace ui |
| OLD | NEW |