| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 StrongBinding<PexeCompilerInit> strong_binding_; | 41 StrongBinding<PexeCompilerInit> strong_binding_; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 class MultiPexeCompiler : public ApplicationDelegate { | 44 class MultiPexeCompiler : public ApplicationDelegate { |
| 45 public: | 45 public: |
| 46 MultiPexeCompiler() {} | 46 MultiPexeCompiler() {} |
| 47 | 47 |
| 48 // From ApplicationDelegate | 48 // From ApplicationDelegate |
| 49 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { | 49 bool ConfigureIncomingConnection( |
| 50 connection->GetServiceProviderImpl().AddService<PexeCompilerInit>( | 50 ServiceProviderImpl* service_provider_impl) override { |
| 51 service_provider_impl->AddService<PexeCompilerInit>( |
| 51 [](const ConnectionContext& connection_context, | 52 [](const ConnectionContext& connection_context, |
| 52 InterfaceRequest<PexeCompilerInit> request) { | 53 InterfaceRequest<PexeCompilerInit> request) { |
| 53 new StrongBindingPexeCompilerImpl(request.Pass()); | 54 new StrongBindingPexeCompilerImpl(request.Pass()); |
| 54 }); | 55 }); |
| 55 return true; | 56 return true; |
| 56 } | 57 } |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace nacl | 60 } // namespace nacl |
| 60 } // namespace mojo | 61 } // namespace mojo |
| 61 | 62 |
| 62 MojoResult MojoMain(MojoHandle application_request) { | 63 MojoResult MojoMain(MojoHandle application_request) { |
| 63 mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeCompiler>( | 64 mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeCompiler>( |
| 64 new mojo::nacl::MultiPexeCompiler())); | 65 new mojo::nacl::MultiPexeCompiler())); |
| 65 return runner.Run(application_request); | 66 return runner.Run(application_request); |
| 66 } | 67 } |
| OLD | NEW |