| 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 ppp_messaging.idl modified Mon Aug 29 10:11:34 2011. */ | 6 /* From ppp_messaging.idl modified Wed Oct 5 14:06:02 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPP_MESSAGING_H_ | 8 #ifndef PPAPI_C_PPP_MESSAGING_H_ |
| 9 #define PPAPI_C_PPP_MESSAGING_H_ | 9 #define PPAPI_C_PPP_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 11 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * @addtogroup Interfaces | 30 * @addtogroup Interfaces |
| 31 * @{ | 31 * @{ |
| 32 */ | 32 */ |
| 33 /** | 33 /** |
| 34 * The <code>PPP_Messaging</code> interface contains pointers to functions | 34 * The <code>PPP_Messaging</code> interface contains pointers to functions |
| 35 * that you must implement to handle postMessage events on the associated | 35 * that you must implement to handle postMessage events on the associated |
| 36 * DOM element. | 36 * DOM element. |
| 37 */ | 37 */ |
| 38 struct PPP_Messaging { | 38 struct PPP_Messaging_1_0 { |
| 39 /** | 39 /** |
| 40 * HandleMessage() is a function that the browser calls when PostMessage() | 40 * HandleMessage() is a function that the browser calls when PostMessage() |
| 41 * is invoked on the DOM element for the module instance in JavaScript. Note | 41 * is invoked on the DOM element for the module instance in JavaScript. Note |
| 42 * that PostMessage() in the JavaScript interface is asynchronous, meaning | 42 * that PostMessage() in the JavaScript interface is asynchronous, meaning |
| 43 * JavaScript execution will not be blocked while HandleMessage() is | 43 * JavaScript execution will not be blocked while HandleMessage() is |
| 44 * processing the message. | 44 * processing the message. |
| 45 * | 45 * |
| 46 * @param[in] instance A <code>PP_Instance</code> identifying one instance | 46 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 47 * of a module. | 47 * of a module. |
| 48 * @param[in] message A <code>PP_Var</code> containing the data to be sent | 48 * @param[in] message A <code>PP_Var</code> containing the data to be sent |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 * <script type="text/javascript"> | 63 * <script type="text/javascript"> |
| 64 * document.getElementById('plugin').postMessage("Hello world!"); | 64 * document.getElementById('plugin').postMessage("Hello world!"); |
| 65 * </script> | 65 * </script> |
| 66 * </body> | 66 * </body> |
| 67 * | 67 * |
| 68 * </code> | 68 * </code> |
| 69 * | 69 * |
| 70 */ | 70 */ |
| 71 void (*HandleMessage)(PP_Instance instance, struct PP_Var message); | 71 void (*HandleMessage)(PP_Instance instance, struct PP_Var message); |
| 72 }; | 72 }; |
| 73 |
| 74 typedef struct PPP_Messaging_1_0 PPP_Messaging; |
| 73 /** | 75 /** |
| 74 * @} | 76 * @} |
| 75 */ | 77 */ |
| 76 | 78 |
| 77 #endif /* PPAPI_C_PPP_MESSAGING_H_ */ | 79 #endif /* PPAPI_C_PPP_MESSAGING_H_ */ |
| 78 | 80 |
| OLD | NEW |