OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "mojo/nacl/nonsfi/file_util.h" | 8 #include "mojo/nacl/nonsfi/file_util.h" |
9 #include "mojo/nacl/nonsfi/nexe_launcher_nonsfi.h" | 9 #include "mojo/nacl/nonsfi/nexe_launcher_nonsfi.h" |
10 #include "mojo/public/c/system/main.h" | 10 #include "mojo/public/c/system/main.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 private: | 37 private: |
38 StrongBinding<PexeLinkerInit> strong_binding_; | 38 StrongBinding<PexeLinkerInit> strong_binding_; |
39 }; | 39 }; |
40 | 40 |
41 class MultiPexeLinker : public ApplicationDelegate { | 41 class MultiPexeLinker : public ApplicationDelegate { |
42 public: | 42 public: |
43 MultiPexeLinker() {} | 43 MultiPexeLinker() {} |
44 | 44 |
45 // From ApplicationDelegate | 45 // From ApplicationDelegate |
46 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { | 46 bool ConfigureIncomingConnection( |
47 connection->GetServiceProviderImpl().AddService<PexeLinkerInit>( | 47 ServiceProviderImpl* service_provider_impl) override { |
| 48 service_provider_impl->AddService<PexeLinkerInit>( |
48 [](const ConnectionContext& connection_context, | 49 [](const ConnectionContext& connection_context, |
49 InterfaceRequest<PexeLinkerInit> request) { | 50 InterfaceRequest<PexeLinkerInit> request) { |
50 new StrongBindingPexeLinkerImpl(request.Pass()); | 51 new StrongBindingPexeLinkerImpl(request.Pass()); |
51 }); | 52 }); |
52 return true; | 53 return true; |
53 } | 54 } |
54 }; | 55 }; |
55 | 56 |
56 } // namespace nacl | 57 } // namespace nacl |
57 } // namespace mojo | 58 } // namespace mojo |
58 | 59 |
59 MojoResult MojoMain(MojoHandle application_request) { | 60 MojoResult MojoMain(MojoHandle application_request) { |
60 mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeLinker>( | 61 mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeLinker>( |
61 new mojo::nacl::MultiPexeLinker())); | 62 new mojo::nacl::MultiPexeLinker())); |
62 return runner.Run(application_request); | 63 return runner.Run(application_request); |
63 } | 64 } |
OLD | NEW |