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

Unified Diff: mojo/ui/content_viewer_app.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 | « mojo/ui/content_viewer_app.h ('k') | mojo/ui/view_provider_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/ui/content_viewer_app.cc
diff --git a/mojo/ui/content_viewer_app.cc b/mojo/ui/content_viewer_app.cc
index 42d31920fc9672597a6a8a14a199809c7f728545..a56bbcb45af743f234c8507dd2f2dba2094da21b 100644
--- a/mojo/ui/content_viewer_app.cc
+++ b/mojo/ui/content_viewer_app.cc
@@ -49,18 +49,16 @@ void ContentViewerApp::Initialize(mojo::ApplicationImpl* app_impl) {
bool ContentViewerApp::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::ContentHandler>(this);
+ connection->GetServiceProviderImpl().AddService<ContentHandler>([this](
+ const ConnectionContext& connection_context,
+ InterfaceRequest<ContentHandler> content_handler_request) {
+ bindings_.AddBinding(
+ new DelegatingContentHandler(this, connection_context.connection_url),
+ content_handler_request.Pass());
+ });
return true;
}
-void ContentViewerApp::Create(
- const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<mojo::ContentHandler> request) {
- bindings_.AddBinding(
- new DelegatingContentHandler(this, connection_context.connection_url),
- request.Pass());
-}
-
void ContentViewerApp::StartViewer(
const std::string& content_handler_url,
mojo::InterfaceRequest<mojo::Application> application_request,
« no previous file with comments | « mojo/ui/content_viewer_app.h ('k') | mojo/ui/view_provider_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698