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

Unified Diff: examples/indirect_service/indirect_integer_service.cc

Issue 1975253002: ApplicationConnection devolution, part 2.1. (Closed) Base URL: https://github.com/domokit/mojo.git@work792-x-work791_service_registry_spimpl
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 | « examples/hello_mojo/hello_mojo_server.cc ('k') | examples/indirect_service/integer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/indirect_service/indirect_integer_service.cc
diff --git a/examples/indirect_service/indirect_integer_service.cc b/examples/indirect_service/indirect_integer_service.cc
index 137eb10df5c58580f10f81cd132989dbf8cb3019..c5bff99eec7ef985caff483f4384efbd095140a1 100644
--- a/examples/indirect_service/indirect_integer_service.cc
+++ b/examples/indirect_service/indirect_integer_service.cc
@@ -49,22 +49,17 @@ private:
StrongBinding<IndirectIntegerService> binding_;
};
-class IndirectIntegerServiceAppDelegate
- : public ApplicationDelegate,
- public InterfaceFactory<IndirectIntegerService> {
+class IndirectIntegerServiceAppDelegate : public ApplicationDelegate {
public:
bool ConfigureIncomingConnection(
ApplicationConnection* connection) override {
- connection->AddService(this);
+ connection->GetServiceProviderImpl().AddService<IndirectIntegerService>(
+ [](const ConnectionContext& connection_context,
+ InterfaceRequest<IndirectIntegerService> request) {
+ new IndirectIntegerServiceImpl(request.Pass());
+ });
return true;
}
-
- private:
- // InterfaceFactory<IndirectIntegerService>
- void Create(const mojo::ConnectionContext& connection_context,
- InterfaceRequest<IndirectIntegerService> request) override {
- new IndirectIntegerServiceImpl(request.Pass());
- }
};
} // namespace examples
« no previous file with comments | « examples/hello_mojo/hello_mojo_server.cc ('k') | examples/indirect_service/integer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698