| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 new TouchscreenDeviceManagerOzone()); | 80 new TouchscreenDeviceManagerOzone()); |
| 81 } | 81 } |
| 82 #endif | 82 #endif |
| 83 virtual void InitializeUI() OVERRIDE { | 83 virtual void InitializeUI() OVERRIDE { |
| 84 surface_factory_ozone_.reset( | 84 surface_factory_ozone_.reset( |
| 85 new DriSurfaceFactory(dri_.get(), screen_manager_.get())); | 85 new DriSurfaceFactory(dri_.get(), screen_manager_.get())); |
| 86 cursor_factory_ozone_.reset( | 86 cursor_factory_ozone_.reset( |
| 87 new CursorFactoryEvdevDri(surface_factory_ozone_.get())); | 87 new CursorFactoryEvdevDri(surface_factory_ozone_.get())); |
| 88 event_factory_ozone_.reset(new EventFactoryEvdev( | 88 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 89 cursor_factory_ozone_.get(), device_manager_.get())); | 89 cursor_factory_ozone_.get(), device_manager_.get())); |
| 90 if (surface_factory_ozone_->InitializeHardware() != |
| 91 DriSurfaceFactory::INITIALIZED) |
| 92 LOG(FATAL) << "failed to initialize display hardware"; |
| 93 |
| 90 } | 94 } |
| 91 | 95 |
| 92 virtual void InitializeGPU() OVERRIDE {} | 96 virtual void InitializeGPU() OVERRIDE {} |
| 93 | 97 |
| 94 private: | 98 private: |
| 95 scoped_ptr<VirtualTerminalManager> vt_manager_; | 99 scoped_ptr<VirtualTerminalManager> vt_manager_; |
| 96 scoped_ptr<DriWrapper> dri_; | 100 scoped_ptr<DriWrapper> dri_; |
| 97 scoped_ptr<DriBufferGenerator> buffer_generator_; | 101 scoped_ptr<DriBufferGenerator> buffer_generator_; |
| 98 scoped_ptr<ScreenManager> screen_manager_; | 102 scoped_ptr<ScreenManager> screen_manager_; |
| 99 scoped_ptr<DeviceManager> device_manager_; | 103 scoped_ptr<DeviceManager> device_manager_; |
| 100 | 104 |
| 101 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_; | 105 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_; |
| 102 scoped_ptr<CursorFactoryEvdevDri> cursor_factory_ozone_; | 106 scoped_ptr<CursorFactoryEvdevDri> cursor_factory_ozone_; |
| 103 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 107 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
| 104 | 108 |
| 105 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 109 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 106 }; | 110 }; |
| 107 | 111 |
| 108 } // namespace | 112 } // namespace |
| 109 | 113 |
| 110 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 114 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } |
| 111 | 115 |
| 112 } // namespace ui | 116 } // namespace ui |
| OLD | NEW |