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

Unified Diff: ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « shell/test/pingable_app.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc
diff --git a/ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc b/ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc
index ecbd1a98faff17ba527ee7ff4495279481756388..5182396943007df7c4059b71bf5e0f91c8492bfa 100644
--- a/ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc
+++ b/ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc
@@ -14,24 +14,6 @@
namespace ui {
-class InterfaceFactoryDrmHost
- : public mojo::InterfaceFactory<mojo::OzoneDrmHost> {
- // mojo::InterfaceFactory implementation.
- void Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<mojo::OzoneDrmHost> request) override {
- new MojoDrmHostImpl(request.Pass());
- }
-};
-
-class InterfaceFactoryDrmGpu
- : public mojo::InterfaceFactory<mojo::OzoneDrmGpu> {
- // mojo::InterfaceFactory<OzoneDrmGpu> implementation.
- void Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<mojo::OzoneDrmGpu> request) override {
- new MojoDrmGpuImpl(request.Pass());
- }
-};
-
class DrmIpcInitHelperMojo : public IpcInitHelperMojo {
public:
DrmIpcInitHelperMojo();
@@ -68,13 +50,21 @@ void DrmIpcInitHelperMojo::GpuInitialize(mojo::ApplicationImpl* application) {
bool DrmIpcInitHelperMojo::HostConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::OzoneDrmHost>(new InterfaceFactoryDrmHost());
+ connection->GetServiceProviderImpl().AddService<mojo::OzoneDrmHost>(
+ [](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<mojo::OzoneDrmHost> request) {
+ new MojoDrmHostImpl(request.Pass());
+ });
return true;
}
bool DrmIpcInitHelperMojo::GpuConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::OzoneDrmGpu>(new InterfaceFactoryDrmGpu());
+ connection->GetServiceProviderImpl().AddService<mojo::OzoneDrmGpu>(
+ [](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<mojo::OzoneDrmGpu> request) {
+ new MojoDrmGpuImpl(request.Pass());
+ });
return true;
}
« 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