| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 Aug 29 10:11:34 2011. */ | 6 /* From ppb_messaging.idl modified Wed Oct 5 14:06:02 2011. */ |
| 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 10 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * @addtogroup Interfaces | 29 * @addtogroup Interfaces |
| 30 * @{ | 30 * @{ |
| 31 */ | 31 */ |
| 32 /** | 32 /** |
| 33 * The <code>PPB_Messaging</code> interface is implemented by the browser | 33 * The <code>PPB_Messaging</code> interface is implemented by the browser |
| 34 * and is related to sending messages to JavaScript message event listeners on | 34 * and is related to sending messages to JavaScript message event listeners on |
| 35 * the DOM element associated with specific module instance. | 35 * the DOM element associated with specific module instance. |
| 36 */ | 36 */ |
| 37 struct PPB_Messaging { | 37 struct PPB_Messaging_1_0 { |
| 38 /** | 38 /** |
| 39 * PostMessage() asynchronously invokes any listeners for message events on | 39 * PostMessage() asynchronously invokes any listeners for message events on |
| 40 * the DOM element for the given module instance. A call to PostMessage() | 40 * the DOM element for the given module instance. A call to PostMessage() |
| 41 * will not block while the message is processed. | 41 * will not block while the message is processed. |
| 42 * | 42 * |
| 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 * Message can have a numeric, boolean, or string value; arrays and | 47 * Message can have a numeric, boolean, or string value; arrays and |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 * sizeof(hello_world)); | 86 * sizeof(hello_world)); |
| 87 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. | 87 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. |
| 88 * ppb_var_interface->Release(hello_var); | 88 * ppb_var_interface->Release(hello_var); |
| 89 * | 89 * |
| 90 * </code> | 90 * </code> |
| 91 * | 91 * |
| 92 * The browser will pop-up an alert saying "Hello world!" | 92 * The browser will pop-up an alert saying "Hello world!" |
| 93 */ | 93 */ |
| 94 void (*PostMessage)(PP_Instance instance, struct PP_Var message); | 94 void (*PostMessage)(PP_Instance instance, struct PP_Var message); |
| 95 }; | 95 }; |
| 96 |
| 97 typedef struct PPB_Messaging_1_0 PPB_Messaging; |
| 96 /** | 98 /** |
| 97 * @} | 99 * @} |
| 98 */ | 100 */ |
| 99 | 101 |
| 100 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ | 102 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ |
| 101 | 103 |
| OLD | NEW |