OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "services/files/files_app.h" | 5 #include "services/files/files_app.h" |
6 | 6 |
| 7 #include "mojo/public/cpp/application/service_provider_impl.h" |
7 #include "mojo/services/files/interfaces/files.mojom.h" | 8 #include "mojo/services/files/interfaces/files.mojom.h" |
8 #include "services/files/files_impl.h" | 9 #include "services/files/files_impl.h" |
9 | 10 |
10 namespace mojo { | 11 namespace mojo { |
11 namespace files { | 12 namespace files { |
12 | 13 |
13 FilesApp::FilesApp() {} | 14 FilesApp::FilesApp() {} |
14 FilesApp::~FilesApp() {} | 15 FilesApp::~FilesApp() {} |
15 | 16 |
16 bool FilesApp::ConfigureIncomingConnection( | 17 bool FilesApp::OnAcceptConnection(ServiceProviderImpl* service_provider_impl) { |
17 ServiceProviderImpl* service_provider_impl) { | |
18 service_provider_impl->AddService<Files>( | 18 service_provider_impl->AddService<Files>( |
19 [](const ConnectionContext& connection_context, | 19 [](const ConnectionContext& connection_context, |
20 InterfaceRequest<Files> files_request) { | 20 InterfaceRequest<Files> files_request) { |
21 new FilesImpl(connection_context, files_request.Pass()); | 21 new FilesImpl(connection_context, files_request.Pass()); |
22 }); | 22 }); |
23 return true; | 23 return true; |
24 } | 24 } |
25 | 25 |
26 } // namespace files | 26 } // namespace files |
27 } // namespace mojo | 27 } // namespace mojo |
OLD | NEW |