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

Side by Side Diff: native_client_sdk/src/libraries/ppapi_simple/ps.h

Issue 412083002: [NaCl SDK] Allow ppapi_simple executables to run in both sel_ldr and in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 (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_SIMPLE_PS_H_ 5 #ifndef PPAPI_SIMPLE_PS_H_
6 #define PPAPI_SIMPLE_PS_H_ 6 #define PPAPI_SIMPLE_PS_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "sdk_util/macros.h" 9 #include "sdk_util/macros.h"
10 10
(...skipping 25 matching lines...) Expand all
36 * a base class, and overload the appropriate virtual functions such as 36 * a base class, and overload the appropriate virtual functions such as
37 * Main, ChangeContext, or Render. 37 * Main, ChangeContext, or Render.
38 */ 38 */
39 39
40 /** 40 /**
41 * PSGetInstanceId 41 * PSGetInstanceId
42 * 42 *
43 * Return the PP_Instance id of this instance of the module. This is required 43 * Return the PP_Instance id of this instance of the module. This is required
44 * by most of the Pepper resource creation routines. 44 * by most of the Pepper resource creation routines.
45 */ 45 */
46 PP_Instance PSGetInstanceId(); 46 PP_Instance PSGetInstanceId(void);
47 47
48 48
49 /** 49 /**
50 * PSGetInterface 50 * PSGetInterface
51 * 51 *
52 * Return the Pepper instance referred to by 'name'. Will return a pointer 52 * Return the Pepper instance referred to by 'name'. Will return a pointer
53 * to the interface, or NULL if not found or not available. 53 * to the interface, or NULL if not found or not available.
54 */ 54 */
55 const void* PSGetInterface(const char *name); 55 const void* PSGetInterface(const char *name);
56 56
57 57
58 /** 58 /**
59 * PSUserCreateInstance 59 * PSUserCreateInstance
60 * 60 *
61 * Prototype for the user provided function which creates and configures 61 * Prototype for the user provided function which creates and configures
62 * the instance object. This function is defined by one of the macros below, 62 * the instance object. This function is defined by one of the macros below,
binji 2014/07/25 17:04:36 fix: There are no macros below
Sam Clegg 2014/08/20 15:24:29 I removed this function completely. Since this ch
63 * or by the equivalent macro in one of the other headers. For 'C' 63 * or by the equivalent macro in one of the other headers. For 'C'
64 * development, one of the basic instances which support C callback are used. 64 * development, one of the basic instances which support C callback are used.
65 * For C++, this function should instantiate the user defined instance. See 65 * For C++, this function should instantiate the user defined instance.
66 * the two macros below. 66 * See ps_main.h for an example of how this is defined.
67 */ 67 */
68 extern void* PSUserCreateInstance(PP_Instance inst); 68 extern void* PSUserCreateInstance(PP_Instance inst);
69 69
70 70
71 /**
72 * PPAPI_SIMPLE_USE_MAIN
73 *
74 * For use with C projects, this macro calls the provided factory with
75 * configuration information.
76 */
77 #define PPAPI_SIMPLE_USE_MAIN(factory, func) \
78 void* PSUserCreateInstance(PP_Instance inst) { \
79 return factory(inst, func); \
80 }
81
82
83 EXTERN_C_END 71 EXTERN_C_END
84 72
85 73
86 #endif // PPAPI_SIMPLE_PS_H_ 74 #endif // PPAPI_SIMPLE_PS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698