Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/app/mojo/mojo_init.h" | 5 #include <iostream> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | |
| 8 #include "mojo/application_manager/application_manager.h" | |
| 9 #include "mojo/embedder/embedder.h" | 7 #include "mojo/embedder/embedder.h" |
| 10 #include "mojo/embedder/simple_platform_support.h" | 8 #include "mojo/embedder/simple_platform_support.h" |
| 9 #include "mojo/monacl/monacl_sel_main.h" | |
| 11 | 10 |
| 12 namespace content { | |
| 13 | 11 |
| 14 void InitializeMojo() { | 12 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.
| |
| 13 if (argc < 3) { | |
| 14 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
| |
| 15 return 1; | |
| 16 } | |
| 17 | |
| 18 const char* nexe_file = argv[2]; | |
| 19 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.
| |
| 20 | |
| 15 mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>( | 21 mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>( |
| 16 new mojo::embedder::SimplePlatformSupport())); | 22 new mojo::embedder::SimplePlatformSupport())); |
| 17 mojo::ApplicationManager::GetInstance(); | 23 |
| 24 // Does not return. | |
| 25 LaunchNaCl(nexe_file, irt_file, argc - 2, argv + 2); | |
| 26 return 1; | |
| 18 } | 27 } |
| 19 | |
| 20 } // namespace content | |
| OLD | NEW |