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

Side by Side Diff: ppapi/c/ppp_message_handler.h

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 | « ppapi/api/ppp_message_handler.idl ('k') | ppapi/cpp/instance.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 /* From ppp_message_handler.idl modified Wed Sep 10 17:04:21 2014. */ 6 /* From ppp_message_handler.idl modified Wed Sep 17 16:54:35 2014. */
7 7
8 #ifndef PPAPI_C_PPP_MESSAGE_HANDLER_H_ 8 #ifndef PPAPI_C_PPP_MESSAGE_HANDLER_H_
9 #define PPAPI_C_PPP_MESSAGE_HANDLER_H_ 9 #define PPAPI_C_PPP_MESSAGE_HANDLER_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_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 16
(...skipping 20 matching lines...) Expand all
37 * must be passed as a parameter to PPB_Messaging::RegisterMessageHandler. 37 * must be passed as a parameter to PPB_Messaging::RegisterMessageHandler.
38 */ 38 */
39 struct PPP_MessageHandler_0_2 { /* dev */ 39 struct PPP_MessageHandler_0_2 { /* dev */
40 /** 40 /**
41 * Invoked as a result of JavaScript invoking postMessage() on the plugin's 41 * Invoked as a result of JavaScript invoking postMessage() on the plugin's
42 * DOM element. 42 * DOM element.
43 * 43 *
44 * @param[in] instance A <code>PP_Instance</code> identifying one instance 44 * @param[in] instance A <code>PP_Instance</code> identifying one instance
45 * of a module. 45 * of a module.
46 * @param[in] user_data is the same pointer which was provided by a call to 46 * @param[in] user_data is the same pointer which was provided by a call to
47 * RegisterMessageHandler. 47 * RegisterMessageHandler().
48 * @param[in] message A copy of the parameter that JavaScript provided to 48 * @param[in] message A copy of the parameter that JavaScript provided to
49 * postMessage(). 49 * postMessage().
50 */ 50 */
51 void (*HandleMessage)(PP_Instance instance, 51 void (*HandleMessage)(PP_Instance instance,
52 void* user_data, 52 void* user_data,
53 const struct PP_Var* message); 53 const struct PP_Var* message);
54 /** 54 /**
55 * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse() 55 * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse()
56 * on the plugin's DOM element. 56 * on the plugin's DOM element.
57 * 57 *
58 * NOTE: JavaScript execution is blocked during the duration of this call.
59 * Hence, the plugin should respond as quickly as possible. For this reason,
60 * blocking completion callbacks are disallowed while handling a blocking
61 * message.
62 *
58 * @param[in] instance A <code>PP_Instance</code> identifying one instance 63 * @param[in] instance A <code>PP_Instance</code> identifying one instance
59 * of a module. 64 * of a module.
60 * @param[in] user_data is the same pointer which was provided by a call to 65 * @param[in] user_data is the same pointer which was provided by a call to
61 * RegisterMessageHandler. 66 * RegisterMessageHandler().
62 * @param[in] message is a copy of the parameter that JavaScript provided 67 * @param[in] message is a copy of the parameter that JavaScript provided
63 * to postMessageAndAwaitResponse. 68 * to postMessageAndAwaitResponse().
64 * @param[out] response will be copied to a JavaScript object which is 69 * @param[out] response will be copied to a JavaScript object which is
65 * returned as the result of postMessageAndAwaitResponse to the invoking 70 * returned as the result of postMessageAndAwaitResponse() to the invoking
66 * 71 *
67 */ 72 */
68 void (*HandleBlockingMessage)(PP_Instance instance, 73 void (*HandleBlockingMessage)(PP_Instance instance,
69 void* user_data, 74 void* user_data,
70 const struct PP_Var* message, 75 const struct PP_Var* message,
71 struct PP_Var* response); 76 struct PP_Var* response);
72 /** 77 /**
73 * Invoked when the handler object is no longer needed. After this, no more 78 * Invoked when the handler object is no longer needed. After this, no more
74 * calls will be made which pass this same value for <code>instance</code> 79 * calls will be made which pass this same value for <code>instance</code>
75 * and <code>user_data</code>. 80 * and <code>user_data</code>.
76 * 81 *
77 * @param[in] instance A <code>PP_Instance</code> identifying one instance 82 * @param[in] instance A <code>PP_Instance</code> identifying one instance
78 * of a module. 83 * of a module.
79 * @param[in] user_data is the same pointer which was provided by a call to 84 * @param[in] user_data is the same pointer which was provided by a call to
80 * RegisterMessageHandler. 85 * RegisterMessageHandler.
81 */ 86 */
82 void (*Destroy)(PP_Instance instance, void* user_data); 87 void (*Destroy)(PP_Instance instance, void* user_data);
83 }; 88 };
84 /** 89 /**
85 * @} 90 * @}
86 */ 91 */
87 92
88 #endif /* PPAPI_C_PPP_MESSAGE_HANDLER_H_ */ 93 #endif /* PPAPI_C_PPP_MESSAGE_HANDLER_H_ */
89 94
OLDNEW
« no previous file with comments | « ppapi/api/ppp_message_handler.idl ('k') | ppapi/cpp/instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698