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

Side by Side Diff: native_client_sdk/src/libraries/ppapi_main/ppapi_main.h

Issue 11592003: Add support for simple run of "main" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace missing stdio Created 8 years 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
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_main/ppapi_instance.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef PPAPI_MAIN_PPAPI_MAIN_H_ 5 #ifndef PPAPI_MAIN_PPAPI_MAIN_H_
6 #define PPAPI_MAIN_PPAPI_MAIN_H_ 6 #define PPAPI_MAIN_PPAPI_MAIN_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_module.h" 9 #include "ppapi/c/pp_module.h"
10 #include "utils/macros.h" 10 #include "utils/macros.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // Provided by library for basic instance types 24 // Provided by library for basic instance types
25 void* PPAPI_CreateInstance(PP_Instance inst, const char *args[]); 25 void* PPAPI_CreateInstance(PP_Instance inst, const char *args[]);
26 void* PPAPI_CreateInstance2D(PP_Instance inst, const char *args[]); 26 void* PPAPI_CreateInstance2D(PP_Instance inst, const char *args[]);
27 void* PPAPI_CreateInstance3D(PP_Instance inst, const char *args[]); 27 void* PPAPI_CreateInstance3D(PP_Instance inst, const char *args[]);
28 28
29 EXTERN_C_END 29 EXTERN_C_END
30 30
31 #define PPAPI_MAIN_DEFAULT_ARGS \ 31 #define PPAPI_MAIN_DEFAULT_ARGS \
32 { \ 32 { \
33 "PM_STDIN", "/dev/tty", \ 33 "PM_STDIN", "/dev/null", \
34 "PM_STDIO", "/dev/console0", \ 34 "PM_STDIO", "/dev/console0", \
35 "PM_STDERR", "/dev/console3", \ 35 "PM_STDERR", "/dev/console3", \
36 NULL, NULL \ 36 NULL, NULL \
37 } 37 }
38 38
39 39
40 #define PPAPI_MAIN_USE(factory, args) \ 40 #define PPAPI_MAIN_USE(factory, args) \
41 void* UserCreateInstance(PP_Instance inst) { \ 41 void* UserCreateInstance(PP_Instance inst) { \
42 static const char *params[] = args; \ 42 static const char *params[] = args; \
43 return factory(inst, params); \ 43 return factory(inst, params); \
44 } 44 }
45 45
46 #define PPAPI_MAIN_WITH_DEFAULT_ARGS \ 46 #define PPAPI_MAIN_WITH_DEFAULT_ARGS \
47 PPAPI_MAIN_USE(PPAPI_CreateInstance, PPAPI_MAIN_DEFAULT_ARGS) 47 PPAPI_MAIN_USE(PPAPI_CreateInstance, PPAPI_MAIN_DEFAULT_ARGS)
48 48
49 #define PPAPI_MAIN_WITH_ARGS(args) \ 49 #define PPAPI_MAIN_WITH_ARGS(args) \
50 PPAPI_MAIN_USE(PPAPI_CreateInstance, args) 50 PPAPI_MAIN_USE(PPAPI_CreateInstance, args)
51 51
52 52
53 #endif // PPAPI_MAIN_PPAPI_MAIN_H_ 53 #endif // PPAPI_MAIN_PPAPI_MAIN_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_main/ppapi_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698