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

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: 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
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] 12 [generate_thunk]
13 13
14 label Chrome { 14 label Chrome {
15 M14 = 1.0, 15 M14 = 1.0,
16 [channel=dev] M37 = 1.1 16 [channel=dev] M39 = 1.2
17 }; 17 };
18 18
19 /** 19 /**
20 * The <code>PPB_Messaging</code> interface is implemented by the browser 20 * The <code>PPB_Messaging</code> interface is implemented by the browser
21 * and is related to sending messages to JavaScript message event listeners on 21 * and is related to sending messages to JavaScript message event listeners on
22 * the DOM element associated with specific module instance. 22 * the DOM element associated with specific module instance.
23 */ 23 */
24 interface PPB_Messaging { 24 interface PPB_Messaging {
25 /** 25 /**
26 * PostMessage() asynchronously invokes any listeners for message events on 26 * 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. 113 * of a module.
114 * @param[in] user_data A pointer the plugin may choose to use when handling 114 * @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 115 * calls to functions within PPP_MessageHandler. The browser will pass this
116 * same pointer when invoking functions within PPP_MessageHandler. 116 * same pointer when invoking functions within PPP_MessageHandler.
117 * @param[in] handler The plugin-provided set of functions for handling 117 * @param[in] handler The plugin-provided set of functions for handling
118 * messages. 118 * messages.
119 * @param[in] message_loop Represents the message loop on which 119 * @param[in] message_loop Represents the message loop on which
120 * PPP_MessageHandler functions should be invoked. 120 * PPP_MessageHandler functions should be invoked.
121 * @return PP_OK on success, or an error from pp_errors.h. 121 * @return PP_OK on success, or an error from pp_errors.h.
122 */ 122 */
123 [version=1.1] 123 [version=1.2]
124 int32_t RegisterMessageHandler([in] PP_Instance instance, 124 int32_t RegisterMessageHandler([in] PP_Instance instance,
125 [inout] mem_t user_data, 125 [inout] mem_t user_data,
126 [in] PPP_MessageHandler handler, 126 [in] PPP_MessageHandler handler,
127 [in] PP_Resource message_loop); 127 [in] PP_Resource message_loop);
128 /** 128 /**
129 * Unregisters the current message handler for <code>instance</code> if one 129 * Unregisters the current message handler for <code>instance</code> if one
130 * is registered. After this call, the message handler (if one was 130 * is registered. After this call, the message handler (if one was
131 * registered) will have "Destroy" called on it and will receive no further 131 * registered) will have "Destroy" called on it and will receive no further
132 * messages after that point. After that point, all messages sent from 132 * messages after that point. After that point, all messages sent from
133 * JavaScript using postMessage() will be dispatched to PPP_Messaging (if 133 * JavaScript using postMessage() will be dispatched to PPP_Messaging (if
134 * the plugin supports PPP_MESSAGING_INTERFACE). Attempts to call 134 * the plugin supports PPP_MESSAGING_INTERFACE). Attempts to call
135 * postMessageAndAwaitResponse() from JavaScript will fail. 135 * postMessageAndAwaitResponse() from JavaScript will fail.
136 * 136 *
137 * Attempting to unregister a message handler when none is registered has no 137 * Attempting to unregister a message handler when none is registered has no
138 * effect. 138 * effect.
139 * 139 *
140 * @param[in] instance A <code>PP_Instance</code> identifying one instance 140 * @param[in] instance A <code>PP_Instance</code> identifying one instance
141 * of a module. 141 * of a module.
142 */ 142 */
143 [version=1.1] 143 [version=1.2]
144 void UnregisterMessageHandler([in] PP_Instance instance); 144 void UnregisterMessageHandler([in] PP_Instance instance);
145 }; 145 };
146 146
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698