OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/apps/js/v8_environment.h" | 5 #include "gin/initialize.h" |
6 #include "mojo/public/system/core.h" | 6 #include "mojo/public/system/core.h" |
7 #include "mojo/public/system/macros.h" | 7 #include "mojo/public/system/macros.h" |
8 | 8 |
9 #if defined(WIN32) | 9 #if defined(WIN32) |
10 #if !defined(CDECL) | 10 #if !defined(CDECL) |
11 #define CDECL __cdecl | 11 #define CDECL __cdecl |
12 #endif | 12 #endif |
13 #define MOJO_APPS_JS_EXPORT __declspec(dllexport) | 13 #define MOJO_APPS_JS_EXPORT __declspec(dllexport) |
14 #else | 14 #else |
15 #define CDECL | 15 #define CDECL |
16 #define MOJO_APPS_JS_EXPORT __attribute__((visibility("default"))) | 16 #define MOJO_APPS_JS_EXPORT __attribute__((visibility("default"))) |
17 #endif | 17 #endif |
18 | 18 |
19 extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain( | 19 extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain( |
20 mojo::Handle pipe) { | 20 mojo::Handle pipe) { |
21 mojo::apps::InitializeV8(); | 21 gin::Initialize(); |
22 // TODO(abarth): Load JS off the network and execute it. | 22 // TODO(abarth): Load JS off the network and execute it. |
23 return MOJO_RESULT_OK; | 23 return MOJO_RESULT_OK; |
24 } | 24 } |
OLD | NEW |