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

Unified Diff: examples/echo/README.md

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/content_handler_demo/content_handler_demo.cc ('k') | examples/echo/echo_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/echo/README.md
diff --git a/examples/echo/README.md b/examples/echo/README.md
index 04c5c007ccf1530e9dccc65a29437a781f8f154b..52c3ec38bc52849ad81e180fcb9fba014105e8a2 100644
--- a/examples/echo/README.md
+++ b/examples/echo/README.md
@@ -127,23 +127,22 @@ means it has a `MojoMain` function, an `ApplicationRunner`, and an
echo_server.cc contains three different types of servers, though only one can be
used at a time. To try changing the server, uncomment one of the lines in
-MojoMain. These different `ApplicationDelegate` derivations demonstrate how
-differently the `InterfaceFactory` can be created. Each server derives from
-`InterfaceFactory`, which implements an interface and binds it to incoming
-requests.
+MojoMain. These different `ApplicationDelegate` derivations demonstrate
+different ways in which incoming requests can be handled.
All three servers, being `ApplicationDelegate` derivations, implement
`ConfigureIncomingConnection` in the same way:
```
-connection->AddService<Echo>(this);
+connection->GetServiceProviderImpl().AddService<Echo>(
+ [this](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<Echo> echo_request) {
+ ...
+ });
```
-This should be read as "For any incoming connections to this server, use `this`
-as a factory to create the Echo interface".
-
-Each server's `Create` method will now be called when a new connection wants
-to access the Echo interface.
+This should be read as "For any incoming connections to this server, use the
+given lambda function use `this` to create the Echo interface".
### EchoImpl: The Interface Implementation
« no previous file with comments | « examples/content_handler_demo/content_handler_demo.cc ('k') | examples/echo/echo_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698