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

Unified Diff: examples/indirect_service/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/indirect_service/indirect_integer_service.cc ('k') | examples/native_run_app/native_run_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/indirect_service/integer_service.cc
diff --git a/examples/indirect_service/integer_service.cc b/examples/indirect_service/integer_service.cc
index 49272674b94e9cb7b70bbf799155057954234ea9..6e8b6ac967c4ce3e36b89cdc78c77c93b7ce2834 100644
--- a/examples/indirect_service/integer_service.cc
+++ b/examples/indirect_service/integer_service.cc
@@ -29,21 +29,17 @@ class IntegerServiceImpl : public IntegerService {
StrongBinding<IntegerService> binding_;
};
-class IntegerServiceAppDelegate : public ApplicationDelegate,
- public InterfaceFactory<IntegerService> {
+class IntegerServiceAppDelegate : public ApplicationDelegate {
public:
bool ConfigureIncomingConnection(
ApplicationConnection* connection) override {
- connection->AddService(this);
+ connection->GetServiceProviderImpl().AddService<IntegerService>(
+ [](const ConnectionContext& connection_context,
+ InterfaceRequest<IntegerService> request) {
+ new IntegerServiceImpl(request.Pass());
+ });
return true;
}
-
- private:
- // InterfaceFactory<IntegerService>
- void Create(const mojo::ConnectionContext& connection_context,
- InterfaceRequest<IntegerService> request) override {
- new IntegerServiceImpl(request.Pass());
- }
};
} // namespace examples
« no previous file with comments | « examples/indirect_service/indirect_integer_service.cc ('k') | examples/native_run_app/native_run_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698