| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/x11/ozone_platform_x11.h" | 5 #include "ui/ozone/platform/x11/ozone_platform_x11.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/events/platform/x11/x11_event_source_libevent.h" | 10 #include "ui/events/platform/x11/x11_event_source_libevent.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 window_manager_.reset(new X11WindowManagerOzone); | 82 window_manager_.reset(new X11WindowManagerOzone); |
| 83 event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); | 83 event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
| 84 surface_factory_ozone_.reset(new X11SurfaceFactory()); | 84 surface_factory_ozone_.reset(new X11SurfaceFactory()); |
| 85 overlay_manager_.reset(new StubOverlayManager()); | 85 overlay_manager_.reset(new StubOverlayManager()); |
| 86 input_controller_ = CreateStubInputController(); | 86 input_controller_ = CreateStubInputController(); |
| 87 cursor_factory_ozone_.reset(new X11CursorFactoryOzone()); | 87 cursor_factory_ozone_.reset(new X11CursorFactoryOzone()); |
| 88 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 88 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void InitializeGPU() override { | 91 void InitializeGPU() override { |
| 92 event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
| 92 surface_factory_ozone_.reset(new X11SurfaceFactory()); | 93 surface_factory_ozone_.reset(new X11SurfaceFactory()); |
| 93 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); | 94 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
| 94 } | 95 } |
| 95 | 96 |
| 96 private: | 97 private: |
| 97 // Objects in the Browser process. | 98 // Objects in the Browser process. |
| 98 scoped_ptr<X11WindowManagerOzone> window_manager_; | 99 scoped_ptr<X11WindowManagerOzone> window_manager_; |
| 99 scoped_ptr<X11EventSourceLibevent> event_source_; | |
| 100 scoped_ptr<OverlayManagerOzone> overlay_manager_; | 100 scoped_ptr<OverlayManagerOzone> overlay_manager_; |
| 101 scoped_ptr<InputController> input_controller_; | 101 scoped_ptr<InputController> input_controller_; |
| 102 scoped_ptr<X11CursorFactoryOzone> cursor_factory_ozone_; | 102 scoped_ptr<X11CursorFactoryOzone> cursor_factory_ozone_; |
| 103 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; | 103 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
| 104 | 104 |
| 105 // Objects in the GPU process. | 105 // Objects in the GPU process. |
| 106 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; | 106 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
| 107 | 107 |
| 108 // Objects in both Browser and GPU process. | 108 // Objects in both Browser and GPU process. |
| 109 scoped_ptr<X11EventSourceLibevent> event_source_; |
| 109 scoped_ptr<X11SurfaceFactory> surface_factory_ozone_; | 110 scoped_ptr<X11SurfaceFactory> surface_factory_ozone_; |
| 110 | 111 |
| 111 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); | 112 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace | 115 } // namespace |
| 115 | 116 |
| 116 OzonePlatform* CreateOzonePlatformX11() { | 117 OzonePlatform* CreateOzonePlatformX11() { |
| 117 return new OzonePlatformX11; | 118 return new OzonePlatformX11; |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace ui | 121 } // namespace ui |
| OLD | NEW |