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 Wed Sep 10 15:41:14 2014. */ | 6 /* From ppb_messaging.idl modified Wed Sep 24 10:48:37 2014. */ |
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_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
17 #include "ppapi/c/ppp_message_handler.h" | 17 #include "ppapi/c/ppp_message_handler.h" |
18 | 18 |
19 #define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0" | 19 #define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0" |
20 #define PPB_MESSAGING_INTERFACE_1_2 "PPB_Messaging;1.2" /* dev */ | 20 #define PPB_MESSAGING_INTERFACE_1_2 "PPB_Messaging;1.2" |
21 #define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_0 | 21 #define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_2 |
Junichi Uekawa
2014/10/10 00:56:00
This makes an interface which was available since
Junichi Uekawa
2014/10/10 03:50:44
nevermind, my understanding now is that code compi
| |
22 | 22 |
23 /** | 23 /** |
24 * @file | 24 * @file |
25 * This file defines the <code>PPB_Messaging</code> interface implemented | 25 * This file defines the <code>PPB_Messaging</code> interface implemented |
26 * by the browser for sending messages to DOM elements associated with a | 26 * by the browser for sending messages to DOM elements associated with a |
27 * specific module instance. | 27 * specific module instance. |
28 */ | 28 */ |
29 | 29 |
30 | 30 |
31 /** | 31 /** |
32 * @addtogroup Interfaces | 32 * @addtogroup Interfaces |
33 * @{ | 33 * @{ |
34 */ | 34 */ |
35 /** | 35 /** |
36 * The <code>PPB_Messaging</code> interface is implemented by the browser | 36 * The <code>PPB_Messaging</code> interface is implemented by the browser |
37 * and is related to sending messages to JavaScript message event listeners on | 37 * and is related to sending messages to JavaScript message event listeners on |
38 * the DOM element associated with specific module instance. | 38 * the DOM element associated with specific module instance. |
39 */ | 39 */ |
40 struct PPB_Messaging_1_2 { /* dev */ | 40 struct PPB_Messaging_1_2 { |
41 /** | 41 /** |
42 * PostMessage() asynchronously invokes any listeners for message events on | 42 * PostMessage() asynchronously invokes any listeners for message events on |
43 * the DOM element for the given module instance. A call to PostMessage() | 43 * the DOM element for the given module instance. A call to PostMessage() |
44 * will not block while the message is processed. | 44 * will not block while the message is processed. |
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 to | 48 * @param[in] message A <code>PP_Var</code> containing the data to be sent to |
49 * JavaScript. | 49 * JavaScript. |
50 * <code>message</code> can be any <code>PP_Var</code> type except | 50 * <code>message</code> can be any <code>PP_Var</code> type except |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 * | 150 * |
151 * Attempting to unregister a message handler when none is registered has no | 151 * Attempting to unregister a message handler when none is registered has no |
152 * effect. | 152 * effect. |
153 * | 153 * |
154 * @param[in] instance A <code>PP_Instance</code> identifying one instance | 154 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
155 * of a module. | 155 * of a module. |
156 */ | 156 */ |
157 void (*UnregisterMessageHandler)(PP_Instance instance); | 157 void (*UnregisterMessageHandler)(PP_Instance instance); |
158 }; | 158 }; |
159 | 159 |
160 typedef struct PPB_Messaging_1_2 PPB_Messaging; | |
161 | |
160 struct PPB_Messaging_1_0 { | 162 struct PPB_Messaging_1_0 { |
161 void (*PostMessage)(PP_Instance instance, struct PP_Var message); | 163 void (*PostMessage)(PP_Instance instance, struct PP_Var message); |
162 }; | 164 }; |
163 | |
164 typedef struct PPB_Messaging_1_0 PPB_Messaging; | |
165 /** | 165 /** |
166 * @} | 166 * @} |
167 */ | 167 */ |
168 | 168 |
169 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ | 169 #endif /* PPAPI_C_PPB_MESSAGING_H_ */ |
170 | 170 |
OLD | NEW |