| 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 |
| 6 /* From ppp_messaging.idl modified Wed Jul 13 16:51:47 2011. */ |
| 7 |
| 5 #ifndef PPAPI_C_PPP_MESSAGING_H_ | 8 #ifndef PPAPI_C_PPP_MESSAGING_H_ |
| 6 #define PPAPI_C_PPP_MESSAGING_H_ | 9 #define PPAPI_C_PPP_MESSAGING_H_ |
| 7 | 10 |
| 11 #include "ppapi/c/pp_bool.h" |
| 8 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 9 | 13 #include "ppapi/c/pp_macros.h" |
| 10 struct PP_Var; | 14 #include "ppapi/c/pp_stdint.h" |
| 11 | 15 #include "ppapi/c/pp_var.h" |
| 12 #define PPP_MESSAGING_INTERFACE_0_1 "PPP_Messaging;0.1" | |
| 13 #define PPP_MESSAGING_INTERFACE_1_0 "PPP_Messaging;1.0" | |
| 14 #define PPP_MESSAGING_INTERFACE PPP_MESSAGING_INTERFACE_1_0 | |
| 15 | 16 |
| 16 /** | 17 /** |
| 17 * @file | 18 * @file |
| 18 * This file defines the PPP_Messaging interface containing pointers to | 19 * This file defines the PPP_Messaging interface containing pointers to |
| 19 * functions that you must implement to handle postMessage messages | 20 * functions that you must implement to handle postMessage messages |
| 20 * on the associated DOM element. | 21 * on the associated DOM element. |
| 21 * | 22 * |
| 22 */ | 23 */ |
| 23 | 24 |
| 25 |
| 24 /** | 26 /** |
| 25 * @addtogroup Interfaces | 27 * @addtogroup Interfaces |
| 26 * @{ | 28 * @{ |
| 27 */ | 29 */ |
| 28 | |
| 29 /** | 30 /** |
| 30 * The <code>PPP_Messaging</code> interface contains pointers to functions | 31 * The <code>PPP_Messaging</code> interface contains pointers to functions |
| 31 * that you must implement to handle postMessage events on the associated | 32 * that you must implement to handle postMessage events on the associated |
| 32 * DOM element. | 33 * DOM element. |
| 33 */ | 34 */ |
| 35 #define PPP_MESSAGING_INTERFACE_0_1 "PPP_Messaging;0.1" |
| 36 #define PPP_MESSAGING_INTERFACE_1_0 "PPP_Messaging;1.0" |
| 37 #define PPP_MESSAGING_INTERFACE PPP_MESSAGING_INTERFACE_1_0 |
| 38 |
| 34 struct PPP_Messaging { | 39 struct PPP_Messaging { |
| 35 /** | 40 /** |
| 36 * HandleMessage() is a function that the browser calls when PostMessage() | 41 * HandleMessage() is a function that the browser calls when PostMessage() |
| 37 * is invoked on the DOM element for the module instance in JavaScript. Note | 42 * is invoked on the DOM element for the module instance in JavaScript. Note |
| 38 * that PostMessage() in the JavaScript interface is asynchronous, meaning | 43 * that PostMessage() in the JavaScript interface is asynchronous, meaning |
| 39 * JavaScript execution will not be blocked while HandleMessage() is | 44 * JavaScript execution will not be blocked while HandleMessage() is |
| 40 * processing the message. | 45 * processing the message. |
| 41 * | 46 * |
| 42 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 47 * @param[in] instance A <code>PP_Instance</code> indentifying one instance |
| 43 * of a module. | 48 * of a module. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 62 * </body> | 67 * </body> |
| 63 * | 68 * |
| 64 * @endcode | 69 * @endcode |
| 65 * | 70 * |
| 66 */ | 71 */ |
| 67 void (*HandleMessage)(PP_Instance instance, struct PP_Var message); | 72 void (*HandleMessage)(PP_Instance instance, struct PP_Var message); |
| 68 }; | 73 }; |
| 69 /** | 74 /** |
| 70 * @} | 75 * @} |
| 71 */ | 76 */ |
| 77 |
| 72 #endif /* PPAPI_C_PPP_MESSAGING_H_ */ | 78 #endif /* PPAPI_C_PPP_MESSAGING_H_ */ |
| 73 | 79 |
| OLD | NEW |