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 <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "ui/display/chromeos/virtual_display_delegate.h" | |
rjkroege
2016/09/12 20:31:06
same comment. we will want this to build without c
| |
15 #include "ui/events/platform/x11/x11_event_source_libevent.h" | 16 #include "ui/events/platform/x11/x11_event_source_libevent.h" |
16 #include "ui/ozone/common/stub_overlay_manager.h" | 17 #include "ui/ozone/common/stub_overlay_manager.h" |
17 #include "ui/ozone/platform/x11/native_display_delegate_ozone_x11.h" | |
18 #include "ui/ozone/platform/x11/x11_cursor_factory_ozone.h" | 18 #include "ui/ozone/platform/x11/x11_cursor_factory_ozone.h" |
19 #include "ui/ozone/platform/x11/x11_surface_factory.h" | 19 #include "ui/ozone/platform/x11/x11_surface_factory.h" |
20 #include "ui/ozone/public/gpu_platform_support_host.h" | 20 #include "ui/ozone/public/gpu_platform_support_host.h" |
21 #include "ui/ozone/public/input_controller.h" | 21 #include "ui/ozone/public/input_controller.h" |
22 #include "ui/ozone/public/ozone_platform.h" | 22 #include "ui/ozone/public/ozone_platform.h" |
23 #include "ui/ozone/public/system_input_injector.h" | 23 #include "ui/ozone/public/system_input_injector.h" |
24 #include "ui/platform_window/platform_window.h" | 24 #include "ui/platform_window/platform_window.h" |
25 #include "ui/platform_window/x11/x11_window_manager_ozone.h" | 25 #include "ui/platform_window/x11/x11_window_manager_ozone.h" |
26 #include "ui/platform_window/x11/x11_window_ozone.h" | 26 #include "ui/platform_window/x11/x11_window_ozone.h" |
27 | 27 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 std::unique_ptr<X11WindowOzone> window = base::MakeUnique<X11WindowOzone>( | 79 std::unique_ptr<X11WindowOzone> window = base::MakeUnique<X11WindowOzone>( |
80 event_source_.get(), window_manager_.get(), delegate); | 80 event_source_.get(), window_manager_.get(), delegate); |
81 window->SetBounds(bounds); | 81 window->SetBounds(bounds); |
82 window->Create(); | 82 window->Create(); |
83 window->SetTitle(base::ASCIIToUTF16("Ozone X11")); | 83 window->SetTitle(base::ASCIIToUTF16("Ozone X11")); |
84 return std::move(window); | 84 return std::move(window); |
85 } | 85 } |
86 | 86 |
87 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() | 87 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() |
88 override { | 88 override { |
89 return base::MakeUnique<NativeDisplayDelegateOzoneX11>(); | 89 return base::MakeUnique<display::VirtualDisplayDelegate>(); |
90 } | 90 } |
91 | 91 |
92 void InitializeUI() override { | 92 void InitializeUI() override { |
93 window_manager_.reset(new X11WindowManagerOzone); | 93 window_manager_.reset(new X11WindowManagerOzone); |
94 event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); | 94 event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
95 overlay_manager_.reset(new StubOverlayManager()); | 95 overlay_manager_.reset(new StubOverlayManager()); |
96 input_controller_ = CreateStubInputController(); | 96 input_controller_ = CreateStubInputController(); |
97 cursor_factory_ozone_.reset(new X11CursorFactoryOzone()); | 97 cursor_factory_ozone_.reset(new X11CursorFactoryOzone()); |
98 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 98 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
99 } | 99 } |
(...skipping 17 matching lines...) Expand all Loading... | |
117 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); | 117 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace | 120 } // namespace |
121 | 121 |
122 OzonePlatform* CreateOzonePlatformX11() { | 122 OzonePlatform* CreateOzonePlatformX11() { |
123 return new OzonePlatformX11; | 123 return new OzonePlatformX11; |
124 } | 124 } |
125 | 125 |
126 } // namespace ui | 126 } // namespace ui |
OLD | NEW |