| 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 <fcntl.h> | 5 #include <fcntl.h> |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "mojo/application/application_runner_chromium.h" | 8 #include "mojo/application/application_runner_chromium.h" |
| 9 #include "mojo/application/content_handler_factory.h" | 9 #include "mojo/application/content_handler_factory.h" |
| 10 #include "mojo/data_pipe_utils/data_pipe_utils.h" | 10 #include "mojo/data_pipe_utils/data_pipe_utils.h" |
| 11 #include "mojo/message_pump/message_pump_mojo.h" | 11 #include "mojo/message_pump/message_pump_mojo.h" |
| 12 #include "mojo/nacl/nexe_launcher_nonsfi.h" | 12 #include "mojo/nacl/nonsfi/nexe_launcher_nonsfi.h" |
| 13 #include "mojo/public/c/system/main.h" | 13 #include "mojo/public/c/system/main.h" |
| 14 #include "mojo/public/cpp/application/application_impl.h" | 14 #include "mojo/public/cpp/application/application_impl.h" |
| 15 | 15 |
| 16 namespace nacl { | 16 namespace nacl { |
| 17 namespace content_handler { | 17 namespace content_handler { |
| 18 | 18 |
| 19 class NaClContentHandler : public mojo::ApplicationDelegate, | 19 class NaClContentHandler : public mojo::ApplicationDelegate, |
| 20 public mojo::ContentHandlerFactory::Delegate { | 20 public mojo::ContentHandlerFactory::Delegate { |
| 21 public: | 21 public: |
| 22 NaClContentHandler() : content_handler_factory_(this) {} | 22 NaClContentHandler() : content_handler_factory_(this) {} |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace content_handler | 71 } // namespace content_handler |
| 72 } // namespace nacl | 72 } // namespace nacl |
| 73 | 73 |
| 74 MojoResult MojoMain(MojoHandle application_request) { | 74 MojoResult MojoMain(MojoHandle application_request) { |
| 75 mojo::ApplicationRunnerChromium runner( | 75 mojo::ApplicationRunnerChromium runner( |
| 76 new nacl::content_handler::NaClContentHandler()); | 76 new nacl::content_handler::NaClContentHandler()); |
| 77 return runner.Run(application_request); | 77 return runner.Run(application_request); |
| 78 } | 78 } |
| OLD | NEW |