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

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

Issue 252023009: PPAPI: Add dev synchronous JS->Plugin messaging API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improve comments Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/api/ppb_messaging.idl ('k') | ppapi/c/pp_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
teravest 2014/05/01 19:20:38 nit: 2014
dmichael (off chromium) 2014/05/01 19:55:00 Done.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_Messaging</code> interface implemented
8 * by the browser for sending messages to DOM elements associated with a
9 * specific module instance.
10 */
11
12 label Chrome {
13 [channel=dev] M36 = 0.1
14 };
15
16 /**
17 * The <code>PPP_MessageHandler</code> interface is implemented by the plugin
18 * if the plugin wants to receive messages from a thread other than the main
19 * Pepper thread, or if the plugin wants to handle blocking messages which
20 * JavaScript may send via postMessageAndAwaitResponse().
21 *
22 * This interface struct should not be returned by PPP_GetInterface; instead it
23 * must be passed as a parameter to PPB_Messaging::RegisterMessageHandler.
24 */
25 [no_interface_string]
26 interface PPP_MessageHandler {
27 /**
28 * Invoked as a result of JavaScript invoking postMessage() on the plugin's
29 * DOM element.
30 *
31 * @param[in] instance A <code>PP_Instance</code> identifying one instance
32 * of a module.
33 * @param[in] message A copy of the parameter that JavaScript provided to
34 * postMessage().
35 * @param[in] user_data is the same as was provided by a call to
teravest 2014/05/01 19:20:38 nit: comments are out of order for params. Also tr
dmichael (off chromium) 2014/05/01 19:55:00 Done.
36 * RegisterMessageHandler.
37 */
38 void HandleMessage([in] PP_Instance instance,
39 [in] mem_t user_data,
40 [in] PP_Var message);
41 /**
42 * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse()
teravest 2014/05/01 19:20:38 Where can I find more information on postMessageAn
dmichael (off chromium) 2014/05/01 19:55:00 Sorry, this would be a new addition. Similar to ho
43 * on the plugin's DOM element.
44 *
45 * @param[in] instance A <code>PP_Instance</code> identifying one instance
46 * of a module.
47 * @param[in] message is a copy of the parameter that JavaScript provided
48 * to postMessageAndAwaitResponse.
49 * @param[in] user_data is the same as was provided by a call to
50 * RegisterMessageHandler.
51 * @return will be copied to a JavaScript object which is returned as
52 * the result of postMessageAndAwaitResponse to the invoking JavaScript.
53 */
54 PP_Var HandleBlockingMessage([in] PP_Instance instance,
55 [in] mem_t user_data,
56 [in] PP_Var message);
57 /**
58 * Invoked when the handler object is no longer needed. After this, no more
59 * calls will be made which pass this same value for <code>instance</code>
60 * and <code>user_data</code>.
61 *
62 * @param[in] instance A <code>PP_Instance</code> identifying one instance
63 * of a module.
64 */
65 void Destroy([in] PP_Instance instance,
66 [in] mem_t user_data);
67 };
68
OLDNEW
« no previous file with comments | « ppapi/api/ppb_messaging.idl ('k') | ppapi/c/pp_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698