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

Side by Side Diff: mojo/apps/js/main.cc

Issue 134253004: Mojo: AsyncWaiter and mojo/public/environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "gin/public/isolate_holder.h" 6 #include "gin/public/isolate_holder.h"
7 #include "mojo/apps/js/mojo_runner_delegate.h" 7 #include "mojo/apps/js/mojo_runner_delegate.h"
8 #include "mojo/common/bindings_support_impl.h"
9 #include "mojo/public/gles2/gles2.h" 8 #include "mojo/public/gles2/gles2.h"
10 #include "mojo/public/system/core_cpp.h" 9 #include "mojo/public/system/core_cpp.h"
11 #include "mojo/public/system/macros.h" 10 #include "mojo/public/system/macros.h"
12 11
13 #if defined(WIN32) 12 #if defined(WIN32)
14 #if !defined(CDECL) 13 #if !defined(CDECL)
15 #define CDECL __cdecl 14 #define CDECL __cdecl
16 #endif 15 #endif
17 #define MOJO_APPS_JS_EXPORT __declspec(dllexport) 16 #define MOJO_APPS_JS_EXPORT __declspec(dllexport)
18 #else 17 #else
(...skipping 12 matching lines...) Expand all
31 gin::Runner runner(&delegate, instance.isolate()); 30 gin::Runner runner(&delegate, instance.isolate());
32 delegate.Start(&runner, pipe, module); 31 delegate.Start(&runner, pipe, module);
33 32
34 base::MessageLoop::current()->Run(); 33 base::MessageLoop::current()->Run();
35 } 34 }
36 35
37 } // namespace apps 36 } // namespace apps
38 } // namespace mojo 37 } // namespace mojo
39 38
40 extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain(MojoHandle pipe) { 39 extern "C" MOJO_APPS_JS_EXPORT MojoResult CDECL MojoMain(MojoHandle pipe) {
41 mojo::common::BindingsSupportImpl bindings_support;
42 mojo::BindingsSupport::Set(&bindings_support);
43 MojoGLES2Initialize(); 40 MojoGLES2Initialize();
44 41
45 mojo::apps::Start(pipe, "mojo/apps/js/main"); 42 mojo::apps::Start(pipe, "mojo/apps/js/main");
46 43
47 MojoGLES2Terminate(); 44 MojoGLES2Terminate();
48 mojo::BindingsSupport::Set(NULL);
49 return MOJO_RESULT_OK; 45 return MOJO_RESULT_OK;
50 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698