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, |