| 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" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri( | 82 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri( |
| 83 dri_.get(), screen_manager_.get(), device_manager_.get())); | 83 dri_.get(), screen_manager_.get(), device_manager_.get())); |
| 84 } | 84 } |
| 85 virtual scoped_ptr<TouchscreenDeviceManager> | 85 virtual scoped_ptr<TouchscreenDeviceManager> |
| 86 CreateTouchscreenDeviceManager() OVERRIDE { | 86 CreateTouchscreenDeviceManager() OVERRIDE { |
| 87 return scoped_ptr<TouchscreenDeviceManager>( | 87 return scoped_ptr<TouchscreenDeviceManager>( |
| 88 new TouchscreenDeviceManagerOzone()); | 88 new TouchscreenDeviceManagerOzone()); |
| 89 } | 89 } |
| 90 #endif | 90 #endif |
| 91 virtual void InitializeUI() OVERRIDE { | 91 virtual void InitializeUI() OVERRIDE { |
| 92 dri_->Initialize(); |
| 92 surface_factory_ozone_.reset(new DriSurfaceFactory( | 93 surface_factory_ozone_.reset(new DriSurfaceFactory( |
| 93 dri_.get(), screen_manager_.get(), &window_manager_)); | 94 dri_.get(), screen_manager_.get(), &window_manager_)); |
| 94 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 95 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
| 95 cursor_.reset(new DriCursor(surface_factory_ozone_.get())); | 96 cursor_.reset(new DriCursor(surface_factory_ozone_.get())); |
| 96 event_factory_ozone_.reset( | 97 event_factory_ozone_.reset( |
| 97 new EventFactoryEvdev(cursor_.get(), device_manager_.get())); | 98 new EventFactoryEvdev(cursor_.get(), device_manager_.get())); |
| 98 if (surface_factory_ozone_->InitializeHardware() != | 99 if (surface_factory_ozone_->InitializeHardware() != |
| 99 DriSurfaceFactory::INITIALIZED) | 100 DriSurfaceFactory::INITIALIZED) |
| 100 LOG(FATAL) << "failed to initialize display hardware"; | 101 LOG(FATAL) << "failed to initialize display hardware"; |
| 101 | 102 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 118 DriWindowManager window_manager_; | 119 DriWindowManager window_manager_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 121 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace | 124 } // namespace |
| 124 | 125 |
| 125 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 126 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } |
| 126 | 127 |
| 127 } // namespace ui | 128 } // namespace ui |
| OLD | NEW |