Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ppapi/api/ppb_messaging.idl

Issue 564573002: PPAPI: Make PPP_MessageHandler work in PNaCl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « native_client_sdk/src/libraries/ppapi/library.dsc ('k') | ppapi/api/ppp_message_handler.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 6 /**
7 * This file defines the <code>PPB_Messaging</code> interface implemented 7 * This file defines the <code>PPB_Messaging</code> interface implemented
8 * by the browser for sending messages to DOM elements associated with a 8 * by the browser for sending messages to DOM elements associated with a
9 * specific module instance. 9 * specific module instance.
10 */ 10 */
11 11
12 [generate_thunk]
13
14 label Chrome { 12 label Chrome {
15 M14 = 1.0, 13 M14 = 1.0,
16 [channel=dev] M37 = 1.1 14 [channel=dev] M39 = 1.2
17 }; 15 };
18 16
19 /** 17 /**
20 * The <code>PPB_Messaging</code> interface is implemented by the browser 18 * The <code>PPB_Messaging</code> interface is implemented by the browser
21 * and is related to sending messages to JavaScript message event listeners on 19 * and is related to sending messages to JavaScript message event listeners on
22 * the DOM element associated with specific module instance. 20 * the DOM element associated with specific module instance.
23 */ 21 */
24 interface PPB_Messaging { 22 interface PPB_Messaging {
25 /** 23 /**
26 * PostMessage() asynchronously invokes any listeners for message events on 24 * PostMessage() asynchronously invokes any listeners for message events on
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * of a module. 111 * of a module.
114 * @param[in] user_data A pointer the plugin may choose to use when handling 112 * @param[in] user_data A pointer the plugin may choose to use when handling
115 * calls to functions within PPP_MessageHandler. The browser will pass this 113 * calls to functions within PPP_MessageHandler. The browser will pass this
116 * same pointer when invoking functions within PPP_MessageHandler. 114 * same pointer when invoking functions within PPP_MessageHandler.
117 * @param[in] handler The plugin-provided set of functions for handling 115 * @param[in] handler The plugin-provided set of functions for handling
118 * messages. 116 * messages.
119 * @param[in] message_loop Represents the message loop on which 117 * @param[in] message_loop Represents the message loop on which
120 * PPP_MessageHandler functions should be invoked. 118 * PPP_MessageHandler functions should be invoked.
121 * @return PP_OK on success, or an error from pp_errors.h. 119 * @return PP_OK on success, or an error from pp_errors.h.
122 */ 120 */
123 [version=1.1] 121 [version=1.2]
124 int32_t RegisterMessageHandler([in] PP_Instance instance, 122 int32_t RegisterMessageHandler([in] PP_Instance instance,
125 [inout] mem_t user_data, 123 [inout] mem_t user_data,
126 [in] PPP_MessageHandler handler, 124 [in] PPP_MessageHandler handler,
127 [in] PP_Resource message_loop); 125 [in] PP_Resource message_loop);
128 /** 126 /**
129 * Unregisters the current message handler for <code>instance</code> if one 127 * Unregisters the current message handler for <code>instance</code> if one
130 * is registered. After this call, the message handler (if one was 128 * is registered. After this call, the message handler (if one was
131 * registered) will have "Destroy" called on it and will receive no further 129 * registered) will have "Destroy" called on it and will receive no further
132 * messages after that point. After that point, all messages sent from 130 * messages after that point. After that point, all messages sent from
133 * JavaScript using postMessage() will be dispatched to PPP_Messaging (if 131 * JavaScript using postMessage() will be dispatched to PPP_Messaging (if
134 * the plugin supports PPP_MESSAGING_INTERFACE). Attempts to call 132 * the plugin supports PPP_MESSAGING_INTERFACE). Attempts to call
135 * postMessageAndAwaitResponse() from JavaScript will fail. 133 * postMessageAndAwaitResponse() from JavaScript will fail.
136 * 134 *
137 * Attempting to unregister a message handler when none is registered has no 135 * Attempting to unregister a message handler when none is registered has no
138 * effect. 136 * effect.
139 * 137 *
140 * @param[in] instance A <code>PP_Instance</code> identifying one instance 138 * @param[in] instance A <code>PP_Instance</code> identifying one instance
141 * of a module. 139 * of a module.
142 */ 140 */
143 [version=1.1] 141 [version=1.2]
144 void UnregisterMessageHandler([in] PP_Instance instance); 142 void UnregisterMessageHandler([in] PP_Instance instance);
145 }; 143 };
146 144
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/ppapi/library.dsc ('k') | ppapi/api/ppp_message_handler.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698