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

Side by Side Diff: ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « shell/test/pingable_app.cc ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/public/cpp/application/application_connection.h" 5 #include "mojo/public/cpp/application/application_connection.h"
6 #include "mojo/public/cpp/application/connect.h" 6 #include "mojo/public/cpp/application/connect.h"
7 #include "mojo/services/ozone_drm_gpu/interfaces/ozone_drm_gpu.mojom.h" 7 #include "mojo/services/ozone_drm_gpu/interfaces/ozone_drm_gpu.mojom.h"
8 #include "mojo/services/ozone_drm_host/interfaces/ozone_drm_host.mojom.h" 8 #include "mojo/services/ozone_drm_host/interfaces/ozone_drm_host.mojom.h"
9 #include "ui/ozone/platform/drm/mojo/drm_gpu_delegate.h" 9 #include "ui/ozone/platform/drm/mojo/drm_gpu_delegate.h"
10 #include "ui/ozone/platform/drm/mojo/drm_gpu_impl.h" 10 #include "ui/ozone/platform/drm/mojo/drm_gpu_impl.h"
11 #include "ui/ozone/platform/drm/mojo/drm_host_delegate.h" 11 #include "ui/ozone/platform/drm/mojo/drm_host_delegate.h"
12 #include "ui/ozone/platform/drm/mojo/drm_host_impl.h" 12 #include "ui/ozone/platform/drm/mojo/drm_host_impl.h"
13 #include "ui/ozone/public/ipc_init_helper_mojo.h" 13 #include "ui/ozone/public/ipc_init_helper_mojo.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 class InterfaceFactoryDrmHost 17 class InterfaceFactoryDrmHost
18 : public mojo::InterfaceFactory<mojo::OzoneDrmHost> { 18 : public mojo::InterfaceFactory<mojo::OzoneDrmHost> {
19 // mojo::InterfaceFactory implementation. 19 // mojo::InterfaceFactory implementation.
20 void Create(mojo::ApplicationConnection* connection, 20 void Create(const mojo::ConnectionContext& connection_context,
21 mojo::InterfaceRequest<mojo::OzoneDrmHost> request) override; 21 mojo::InterfaceRequest<mojo::OzoneDrmHost> request) override {
22 new MojoDrmHostImpl(request.Pass());
23 }
22 }; 24 };
23 25
24 class InterfaceFactoryDrmGpu 26 class InterfaceFactoryDrmGpu
25 : public mojo::InterfaceFactory<mojo::OzoneDrmGpu> { 27 : public mojo::InterfaceFactory<mojo::OzoneDrmGpu> {
26 // mojo::InterfaceFactory<OzoneDrmGpu> implementation. 28 // mojo::InterfaceFactory<OzoneDrmGpu> implementation.
27 void Create(mojo::ApplicationConnection* connection, 29 void Create(const mojo::ConnectionContext& connection_context,
28 mojo::InterfaceRequest<mojo::OzoneDrmGpu> request) override; 30 mojo::InterfaceRequest<mojo::OzoneDrmGpu> request) override {
31 new MojoDrmGpuImpl(request.Pass());
32 }
29 }; 33 };
30 34
31 void InterfaceFactoryDrmHost::Create(
32 mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<mojo::OzoneDrmHost> request) {
34 new MojoDrmHostImpl(request.Pass());
35 }
36
37 void InterfaceFactoryDrmGpu::Create(
38 mojo::ApplicationConnection* connection,
39 mojo::InterfaceRequest<mojo::OzoneDrmGpu> request) {
40 new MojoDrmGpuImpl(request.Pass());
41 }
42
43 class DrmIpcInitHelperMojo : public IpcInitHelperMojo { 35 class DrmIpcInitHelperMojo : public IpcInitHelperMojo {
44 public: 36 public:
45 DrmIpcInitHelperMojo(); 37 DrmIpcInitHelperMojo();
46 ~DrmIpcInitHelperMojo(); 38 ~DrmIpcInitHelperMojo();
47 39
48 void HostInitialize(mojo::ApplicationImpl* application) override; 40 void HostInitialize(mojo::ApplicationImpl* application) override;
49 bool HostConfigureIncomingConnection( 41 bool HostConfigureIncomingConnection(
50 mojo::ApplicationConnection* connection) override; 42 mojo::ApplicationConnection* connection) override;
51 43
52 void GpuInitialize(mojo::ApplicationImpl* application) override; 44 void GpuInitialize(mojo::ApplicationImpl* application) override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 connection->AddService<mojo::OzoneDrmGpu>(new InterfaceFactoryDrmGpu()); 77 connection->AddService<mojo::OzoneDrmGpu>(new InterfaceFactoryDrmGpu());
86 return true; 78 return true;
87 } 79 }
88 80
89 // static 81 // static
90 IpcInitHelperOzone* IpcInitHelperOzone::Create() { 82 IpcInitHelperOzone* IpcInitHelperOzone::Create() {
91 return new DrmIpcInitHelperMojo(); 83 return new DrmIpcInitHelperMojo();
92 } 84 }
93 85
94 } // namespace ui 86 } // namespace ui
OLDNEW
« no previous file with comments | « shell/test/pingable_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698