Chromium Code Reviews| Index: mojo/monacl/monacl_shell.cc |
| diff --git a/content/app/mojo/mojo_init.cc b/mojo/monacl/monacl_shell.cc |
| similarity index 50% |
| copy from content/app/mojo/mojo_init.cc |
| copy to mojo/monacl/monacl_shell.cc |
| index 090e69e06fed7c3fe02a0180c44fcba7c9ef7045..3b9e7cb278cf24e4b98394a2bd7aa2b14d456b41 100644 |
| --- a/content/app/mojo/mojo_init.cc |
| +++ b/mojo/monacl/monacl_shell.cc |
| @@ -2,19 +2,26 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "content/app/mojo/mojo_init.h" |
| +#include <iostream> |
| -#include "base/memory/scoped_ptr.h" |
| -#include "mojo/application_manager/application_manager.h" |
| #include "mojo/embedder/embedder.h" |
| #include "mojo/embedder/simple_platform_support.h" |
| +#include "mojo/monacl/monacl_sel_main.h" |
| -namespace content { |
| -void InitializeMojo() { |
| +int main (int argc, char* argv[]) { |
|
Mark Seaborn
2014/09/09 19:13:12
Nit: remove space before "("
Nick Bray (chromium)
2014/09/09 23:12:34
Done.
|
| + if (argc < 3) { |
| + std::cout << "Usage: " << argv[0] << " irt app [args for app]" << std::endl; |
|
Mark Seaborn
2014/09/09 19:13:12
Nit: maybe "irt.nexe app.nexe" to disambiguate? O
Nick Bray (chromium)
2014/09/09 23:12:34
Done, although it's unclear the best way to line w
|
| + return 1; |
| + } |
| + |
| + const char* nexe_file = argv[2]; |
| + const char* irt_file = argv[1]; |
|
Mark Seaborn
2014/09/09 19:13:12
Nit: put before nexe_file to keep the args ordered
Nick Bray (chromium)
2014/09/09 23:12:34
Done.
|
| + |
| mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>( |
| new mojo::embedder::SimplePlatformSupport())); |
| - mojo::ApplicationManager::GetInstance(); |
| -} |
| -} // namespace content |
| + // Does not return. |
| + LaunchNaCl(nexe_file, irt_file, argc - 2, argv + 2); |
| + return 1; |
| +} |