OLD | NEW |
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 | 5 |
6 /* From ppb_messaging.idl modified Mon May 20 15:31:07 2013. */ | 6 /* From ppb_messaging.idl modified Wed Jun 5 10:32:59 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_MESSAGING_H_ | 8 #ifndef PPAPI_C_PPB_MESSAGING_H_ |
9 #define PPAPI_C_PPB_MESSAGING_H_ | 9 #define PPAPI_C_PPB_MESSAGING_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
15 #include "ppapi/c/pp_var.h" | 15 #include "ppapi/c/pp_var.h" |
16 | 16 |
(...skipping 26 matching lines...) Expand all Loading... |
43 * @param[in] instance A <code>PP_Instance</code> identifying one instance | 43 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
44 * of a module. | 44 * of a module. |
45 * @param[in] message A <code>PP_Var</code> containing the data to be sent to | 45 * @param[in] message A <code>PP_Var</code> containing the data to be sent to |
46 * JavaScript. | 46 * JavaScript. |
47 * <code>message</code> can be any <code>PP_Var</code> type except | 47 * <code>message</code> can be any <code>PP_Var</code> type except |
48 * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from | 48 * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from |
49 * Chrome M29 onward. All var types are copied when passing them to | 49 * Chrome M29 onward. All var types are copied when passing them to |
50 * JavaScript. | 50 * JavaScript. |
51 * | 51 * |
52 * When passing array or dictionary <code>PP_Var</code>s, the entire reference | 52 * When passing array or dictionary <code>PP_Var</code>s, the entire reference |
53 * graph will be converted and transferred, including reference cycles if they | 53 * graph will be converted and transferred. If the reference graph has cycles, |
54 * exist. | 54 * the message will not be sent and an error will be logged to the console. |
55 * | 55 * |
56 * Listeners for message events in JavaScript code will receive an object | 56 * Listeners for message events in JavaScript code will receive an object |
57 * conforming to the HTML 5 <code>MessageEvent</code> interface. | 57 * conforming to the HTML 5 <code>MessageEvent</code> interface. |
58 * Specifically, the value of message will be contained as a property called | 58 * Specifically, the value of message will be contained as a property called |
59 * data in the received <code>MessageEvent</code>. | 59 * data in the received <code>MessageEvent</code>. |
60 * | 60 * |
61 * This messaging system is similar to the system used for listening for | 61 * This messaging system is similar to the system used for listening for |
62 * messages from Web Workers. Refer to | 62 * messages from Web Workers. Refer to |
63 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for | 63 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for |
64 * further information. | 64 * further information. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void (*PostMessage)(PP_Instance instance, struct PP_Var message); | 98 void (*PostMessage)(PP_Instance instance, struct PP_Var message); |
99 }; | 99 }; |
100 | 100 |
101 typedef struct PPB_Messaging_1_0 PPB_Messaging; | 101 typedef struct PPB_Messaging_1_0 PPB_Messaging; |
102 /** | 102 /** |
103 * @} | 103 * @} |
104 */ | 104 */ |
105 | 105 |
106 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ | 106 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ |
107 | 107 |
OLD | NEW |