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

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

Issue 318763003: PPAPI: Add C++ wrapper for MessageHandler stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move messag_handler.h to HEADERS section of library.dsc 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 | Annotate | Revision Log
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_cpp/library.dsc ('k') | ppapi/c/ppp_message_handler.h » ('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 2014 The Chromium Authors. All rights reserved. 1 /* Copyright 2014 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>PPP_MessageHandler</code> interface that plugins 7 * This file defines the <code>PPP_MessageHandler</code> interface that plugins
8 * can implement and register using PPB_Messaging::RegisterMessageHandler in 8 * can implement and register using PPB_Messaging::RegisterMessageHandler in
9 * order to handle messages sent from JavaScript via postMessage() or 9 * order to handle messages sent from JavaScript via postMessage() or
10 * postMessageAndAwaitResponse(). 10 * postMessageAndAwaitResponse().
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 [no_interface_string] 26 [no_interface_string]
27 interface PPP_MessageHandler { 27 interface PPP_MessageHandler {
28 /** 28 /**
29 * Invoked as a result of JavaScript invoking postMessage() on the plugin's 29 * Invoked as a result of JavaScript invoking postMessage() on the plugin's
30 * DOM element. 30 * DOM element.
31 * 31 *
32 * @param[in] instance A <code>PP_Instance</code> identifying one instance 32 * @param[in] instance A <code>PP_Instance</code> identifying one instance
33 * of a module. 33 * of a module.
34 * @param[in] user_data is the same pointer which was provided by a call to 34 * @param[in] user_data is the same pointer which was provided by a call to
35 * RegisterMessageHandler. 35 * RegisterMessageHandler().
36 * @param[in] message A copy of the parameter that JavaScript provided to 36 * @param[in] message A copy of the parameter that JavaScript provided to
37 * postMessage(). 37 * postMessage().
38 */ 38 */
39 void HandleMessage([in] PP_Instance instance, 39 void HandleMessage([in] PP_Instance instance,
40 [inout] mem_t user_data, 40 [inout] mem_t user_data,
41 [constptr_in] PP_Var message); 41 [constptr_in] PP_Var message);
42 /** 42 /**
43 * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse() 43 * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse()
44 * on the plugin's DOM element. 44 * on the plugin's DOM element.
45 * 45 *
46 * NOTE: JavaScript execution is blocked during the duration of this call.
47 * Hence, the plugin should respond as quickly as possible. For this reason,
48 * blocking completion callbacks are disallowed while handling a blocking
49 * message.
50 *
46 * @param[in] instance A <code>PP_Instance</code> identifying one instance 51 * @param[in] instance A <code>PP_Instance</code> identifying one instance
47 * of a module. 52 * of a module.
48 * @param[in] user_data is the same pointer which was provided by a call to 53 * @param[in] user_data is the same pointer which was provided by a call to
49 * RegisterMessageHandler. 54 * RegisterMessageHandler().
50 * @param[in] message is a copy of the parameter that JavaScript provided 55 * @param[in] message is a copy of the parameter that JavaScript provided
51 * to postMessageAndAwaitResponse. 56 * to postMessageAndAwaitResponse().
52 * @param[out] response will be copied to a JavaScript object which is 57 * @param[out] response will be copied to a JavaScript object which is
53 * returned as the result of postMessageAndAwaitResponse to the invoking 58 * returned as the result of postMessageAndAwaitResponse() to the invoking
54 JavaScript. 59 JavaScript.
55 */ 60 */
56 void HandleBlockingMessage([in] PP_Instance instance, 61 void HandleBlockingMessage([in] PP_Instance instance,
57 [inout] mem_t user_data, 62 [inout] mem_t user_data,
58 [constptr_in] PP_Var message, 63 [constptr_in] PP_Var message,
59 [out] PP_Var response); 64 [out] PP_Var response);
60 /** 65 /**
61 * Invoked when the handler object is no longer needed. After this, no more 66 * Invoked when the handler object is no longer needed. After this, no more
62 * calls will be made which pass this same value for <code>instance</code> 67 * calls will be made which pass this same value for <code>instance</code>
63 * and <code>user_data</code>. 68 * and <code>user_data</code>.
64 * 69 *
65 * @param[in] instance A <code>PP_Instance</code> identifying one instance 70 * @param[in] instance A <code>PP_Instance</code> identifying one instance
66 * of a module. 71 * of a module.
67 * @param[in] user_data is the same pointer which was provided by a call to 72 * @param[in] user_data is the same pointer which was provided by a call to
68 * RegisterMessageHandler. 73 * RegisterMessageHandler.
69 */ 74 */
70 void Destroy([in] PP_Instance instance, [inout] mem_t user_data); 75 void Destroy([in] PP_Instance instance, [inout] mem_t user_data);
71 }; 76 };
72 77
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_cpp/library.dsc ('k') | ppapi/c/ppp_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698