Index: ui/ozone/platform/x11/ozone_platform_x11.cc |
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc |
index 7863f8001e9686ec25e0406ab07f4fb557c69748..c628abd6f3417775b4989011e5c0cc9819c358ca 100644 |
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc |
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc |
@@ -92,7 +92,8 @@ class OzonePlatformX11 : public OzonePlatform { |
void InitializeUI() override { |
window_manager_.reset(new X11WindowManagerOzone); |
- event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
+ if (!event_source_) |
+ event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
overlay_manager_.reset(new StubOverlayManager()); |
input_controller_ = CreateStubInputController(); |
cursor_factory_ozone_.reset(new X11CursorFactoryOzone()); |
@@ -100,6 +101,8 @@ class OzonePlatformX11 : public OzonePlatform { |
} |
void InitializeGPU() override { |
+ if (!event_source_) |
sadrul
2016/04/19 14:49:49
The null-check here (and above) implies we may be
kylechar
2016/04/19 16:00:20
Yep. In MUS they are both in the same process.
sadrul
2016/04/19 16:13:37
Oh, that's interesting.
PlatformEventSource (and
|
+ event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay())); |
surface_factory_ozone_.reset(new X11SurfaceFactory()); |
gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
} |
@@ -107,7 +110,6 @@ class OzonePlatformX11 : public OzonePlatform { |
private: |
// Objects in the Browser process. |
scoped_ptr<X11WindowManagerOzone> window_manager_; |
- scoped_ptr<X11EventSourceLibevent> event_source_; |
scoped_ptr<OverlayManagerOzone> overlay_manager_; |
scoped_ptr<InputController> input_controller_; |
scoped_ptr<X11CursorFactoryOzone> cursor_factory_ozone_; |
@@ -117,6 +119,9 @@ class OzonePlatformX11 : public OzonePlatform { |
scoped_ptr<X11SurfaceFactory> surface_factory_ozone_; |
scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
+ // Objects in both Browser and GPU process. |
+ scoped_ptr<X11EventSourceLibevent> event_source_; |
+ |
DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11); |
}; |