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

Unified Diff: mojo/apps/js/standalone_main.cc

Issue 627563002: Mojo JS standalone app launches files specified with mojo_shell command-line args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « mojo/apps/js/js_app.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/standalone_main.cc
diff --git a/mojo/apps/js/standalone_main.cc b/mojo/apps/js/standalone_main.cc
index eca936ac927087fe9d201c3cd7f7f3a5d04902a6..efdfcb872f448cab69c87d90b8aa8ff71a57f980 100644
--- a/mojo/apps/js/standalone_main.cc
+++ b/mojo/apps/js/standalone_main.cc
@@ -9,6 +9,7 @@
#include "mojo/apps/js/js_app.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_impl.h"
namespace mojo {
namespace apps {
@@ -35,12 +36,11 @@ class StandaloneApplicationDelegateImpl : public ApplicationDelegateImpl {
virtual void Initialize(ApplicationImpl* app) override {
ApplicationDelegateImpl::Initialize(app);
- // TODO(hansmuller): Find the JS source code path in app->args().
- base::FilePath path(base::FilePath::FromUTF8Unsafe(
- "/builds/dev/src/mojo/apps/js/main.js"));
-
- scoped_ptr<JSApp> js_app(new StandaloneJSApp(this, path));
- StartJSApp(js_app.Pass());
+ for (size_t i = 1; i < app->args().size(); i++) {
+ base::FilePath path(base::FilePath::FromUTF8Unsafe(app->args()[i]));
+ scoped_ptr<JSApp> js_app(new StandaloneJSApp(this, path));
+ StartJSApp(js_app.Pass());
+ }
}
};
« no previous file with comments | « mojo/apps/js/js_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698