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

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

Issue 65943002: Add a basic Mojo app that initializes V8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base dependency Created 7 years, 1 month 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/DEPS ('k') | mojo/apps/js/v8_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/main.cc
diff --git a/mojo/apps/js/main.cc b/mojo/apps/js/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8e57371b3b0a11dcc000630ced942eeee841ff13
--- /dev/null
+++ b/mojo/apps/js/main.cc
@@ -0,0 +1,24 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/apps/js/v8_environment.h"
+#include "mojo/public/system/core.h"
+#include "mojo/public/system/macros.h"
+
+#if defined(WIN32)
+#if !defined(CDECL)
+#define CDECL __cdecl
+#endif
+#define MOJO_APPS_JS_EXPORT __declspec(dllexport)
+#else
+#define CDECL
+#define MOJO_APPS_JS_EXPORT __attribute__((visibility("default")))
+#endif
+
+extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain(
+ mojo::Handle pipe) {
+ mojo::apps::InitializeV8();
+ // TODO(abarth): Load JS off the network and execute it.
+ return MOJO_RESULT_OK;
+}
« no previous file with comments | « mojo/apps/js/DEPS ('k') | mojo/apps/js/v8_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698