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

Side by Side Diff: ui/ozone/platform/x11/ozone_platform_x11.cc

Issue 2765263002: Remove deprecated Ozone initialization functions. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 | « ui/ozone/platform/wayland/ozone_platform_wayland.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | 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/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>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void InitializeUI(const InitParams& params) override { 87 void InitializeUI(const InitParams& params) override {
88 InitializeCommon(params); 88 InitializeCommon(params);
89 CreatePlatformEventSource(); 89 CreatePlatformEventSource();
90 window_manager_ = base::MakeUnique<X11WindowManagerOzone>(); 90 window_manager_ = base::MakeUnique<X11WindowManagerOzone>();
91 overlay_manager_ = base::MakeUnique<StubOverlayManager>(); 91 overlay_manager_ = base::MakeUnique<StubOverlayManager>();
92 input_controller_ = CreateStubInputController(); 92 input_controller_ = CreateStubInputController();
93 cursor_factory_ozone_ = base::MakeUnique<X11CursorFactoryOzone>(); 93 cursor_factory_ozone_ = base::MakeUnique<X11CursorFactoryOzone>();
94 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 94 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
95 } 95 }
96 96
97 void InitializeUI() override { NOTREACHED(); }
98
99 void InitializeGPU(const InitParams& params) override { 97 void InitializeGPU(const InitParams& params) override {
100 InitializeCommon(params); 98 InitializeCommon(params);
101 99
102 // In single process mode either the UI thread will create an event source 100 // In single process mode either the UI thread will create an event source
103 // or it's a test and an event source isn't desired. 101 // or it's a test and an event source isn't desired.
104 if (!params.single_process && !RunningInsideMus()) 102 if (!params.single_process && !RunningInsideMus())
105 CreatePlatformEventSource(); 103 CreatePlatformEventSource();
106 104
107 surface_factory_ozone_ = base::MakeUnique<X11SurfaceFactory>(); 105 surface_factory_ozone_ = base::MakeUnique<X11SurfaceFactory>();
108 } 106 }
109 107
110 void InitializeGPU() override { NOTREACHED(); }
111
112 base::MessageLoop::Type GetMessageLoopTypeForGpu() override { 108 base::MessageLoop::Type GetMessageLoopTypeForGpu() override {
113 // When Ozone X11 backend is running use an UI loop to grab Expose events. 109 // When Ozone X11 backend is running use an UI loop to grab Expose events.
114 // See GLSurfaceGLX and https://crbug.com/326995. 110 // See GLSurfaceGLX and https://crbug.com/326995.
115 return base::MessageLoop::TYPE_UI; 111 return base::MessageLoop::TYPE_UI;
116 } 112 }
117 113
118 private: 114 private:
119 // Performs initialization steps need by both UI and GPU. 115 // Performs initialization steps need by both UI and GPU.
120 void InitializeCommon(const InitParams& params) { 116 void InitializeCommon(const InitParams& params) {
121 // TODO(kylechar): Add DCHECK we only enter InitializeCommon() twice for 117 // TODO(kylechar): Add DCHECK we only enter InitializeCommon() twice for
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); 155 DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11);
160 }; 156 };
161 157
162 } // namespace 158 } // namespace
163 159
164 OzonePlatform* CreateOzonePlatformX11() { 160 OzonePlatform* CreateOzonePlatformX11() {
165 return new OzonePlatformX11; 161 return new OzonePlatformX11;
166 } 162 }
167 163
168 } // namespace ui 164 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/ozone_platform_wayland.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698