Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: ui/ozone/platform/wayland/ozone_platform_wayland.cc

Issue 2389053003: [ozone/wayland] Use FakeDisplayDelegate in order to make "off device" launch work (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/wayland/ozone_platform_wayland.h" 5 #include "ui/ozone/platform/wayland/ozone_platform_wayland.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/ozone/common/native_display_delegate_ozone.h" 8 #include "ui/display/fake_display_delegate.h"
9 #include "ui/ozone/common/stub_overlay_manager.h" 9 #include "ui/ozone/common/stub_overlay_manager.h"
10 #include "ui/ozone/platform/wayland/wayland_connection.h" 10 #include "ui/ozone/platform/wayland/wayland_connection.h"
11 #include "ui/ozone/platform/wayland/wayland_surface_factory.h" 11 #include "ui/ozone/platform/wayland/wayland_surface_factory.h"
12 #include "ui/ozone/platform/wayland/wayland_window.h" 12 #include "ui/ozone/platform/wayland/wayland_window.h"
13 #include "ui/ozone/public/cursor_factory_ozone.h" 13 #include "ui/ozone/public/cursor_factory_ozone.h"
14 #include "ui/ozone/public/gpu_platform_support_host.h" 14 #include "ui/ozone/public/gpu_platform_support_host.h"
15 #include "ui/ozone/public/input_controller.h" 15 #include "ui/ozone/public/input_controller.h"
16 #include "ui/ozone/public/ozone_platform.h" 16 #include "ui/ozone/public/ozone_platform.h"
17 #include "ui/ozone/public/system_input_injector.h" 17 #include "ui/ozone/public/system_input_injector.h"
18 18
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const gfx::Rect& bounds) override { 55 const gfx::Rect& bounds) override {
56 auto window = 56 auto window =
57 base::MakeUnique<WaylandWindow>(delegate, connection_.get(), bounds); 57 base::MakeUnique<WaylandWindow>(delegate, connection_.get(), bounds);
58 if (!window->Initialize()) 58 if (!window->Initialize())
59 return nullptr; 59 return nullptr;
60 return std::move(window); 60 return std::move(window);
61 } 61 }
62 62
63 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 63 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
64 override { 64 override {
65 return base::WrapUnique(new NativeDisplayDelegateOzone); 65 return base::MakeUnique<display::FakeDisplayDelegate>();
66 } 66 }
67 67
68 void InitializeUI() override { 68 void InitializeUI() override {
69 InitParams default_params; 69 InitParams default_params;
70 InitializeUI(default_params); 70 InitializeUI(default_params);
71 } 71 }
72 72
73 void InitializeUI(const InitParams& args) override { 73 void InitializeUI(const InitParams& args) override {
74 connection_.reset(new WaylandConnection); 74 connection_.reset(new WaylandConnection);
75 if (!connection_->Initialize()) 75 if (!connection_->Initialize())
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland); 114 DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland);
115 }; 115 };
116 116
117 } // namespace 117 } // namespace
118 118
119 OzonePlatform* CreateOzonePlatformWayland() { 119 OzonePlatform* CreateOzonePlatformWayland() {
120 return new OzonePlatformWayland; 120 return new OzonePlatformWayland;
121 } 121 }
122 122
123 } // namespace ui 123 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698