| 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 Mon Jun 3 12:26:57 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 * an undefined var will be sent instead and an error will be logged to the |
| 55 * console. |
| 55 * | 56 * |
| 56 * Listeners for message events in JavaScript code will receive an object | 57 * Listeners for message events in JavaScript code will receive an object |
| 57 * conforming to the HTML 5 <code>MessageEvent</code> interface. | 58 * conforming to the HTML 5 <code>MessageEvent</code> interface. |
| 58 * Specifically, the value of message will be contained as a property called | 59 * Specifically, the value of message will be contained as a property called |
| 59 * data in the received <code>MessageEvent</code>. | 60 * data in the received <code>MessageEvent</code>. |
| 60 * | 61 * |
| 61 * This messaging system is similar to the system used for listening for | 62 * This messaging system is similar to the system used for listening for |
| 62 * messages from Web Workers. Refer to | 63 * messages from Web Workers. Refer to |
| 63 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for | 64 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for |
| 64 * further information. | 65 * 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); | 99 void (*PostMessage)(PP_Instance instance, struct PP_Var message); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 typedef struct PPB_Messaging_1_0 PPB_Messaging; | 102 typedef struct PPB_Messaging_1_0 PPB_Messaging; |
| 102 /** | 103 /** |
| 103 * @} | 104 * @} |
| 104 */ | 105 */ |
| 105 | 106 |
| 106 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ | 107 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ |
| 107 | 108 |
| OLD | NEW |