Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: mojo/monacl/monacl_shell.cc

Issue 385983008: Mojo + NaCl prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GYP edit Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698