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

Side by Side Diff: ppapi/c/dev/ppp_messaging_dev.h

Issue 6716005: A proposal and implementation for an initial postMessage interface. These in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5 #ifndef PPAPI_C_DEV_PPP_MESSAGING_DEV_H_
6 #define PPAPI_C_DEV_PPP_MESSAGING_DEV_H_
7
8 #include "ppapi/c/pp_instance.h"
9
10 struct PP_Var;
11
12 #define PPP_MESSAGING_DEV_INTERFACE_0_1 "PPP_Messaging_Dev;0.1"
13
14 #define PPP_MESSAGING_DEV_INTERFACE PPP_MESSAGING_DEV_INTERFACE_0_1
15
16 /**
17 * @file
18 * This file defines the PPP_Messaging_Dev structure - a series of pointers to
19 * methods that you must implement in your module instance if you wish to
20 * handle messages posted to the module instance via calls to postMessage on
21 * the DOM element associated with the module instance.
polina 2011/03/22 22:00:59 You have "module instance" 3 times in the same sen
dmichael(do not use this one) 2011/03/23 17:03:18 Done.
22 *
23 */
24
25 /** @addtogroup Interfaces
26 * @{
27 */
28
29 /**
30 * The PPP_Messaging_Dev interface contains pointers to a series of functions
31 * that you must implement if you wish to handle messages posted to the module
32 * instance via calls to postMessage on the DOM element associated with the
33 * module instance.
34 */
35 struct PPP_Messaging_Dev {
36 /**
37 * HandleMessage is a pointer to a function that the browser will call when
38 * @a postMessage() is invoked on the DOM object for the module instance in
polina 2011/03/22 22:00:59 DOM element
39 * JavaScript. Note that @a postMessage() in the JavaScript interface is
40 * asynchronous, meaning JavaScript execution will not be blocked while
polina 2011/03/22 22:00:59 I think it's more important to note that HandleMes
brettw 2011/03/23 01:59:17 I think the current description is fine for the sa
dmichael(do not use this one) 2011/03/23 17:03:18 I agree with Brett here.
polina 2011/03/24 05:42:33 Won't JavaScript thread be blocked once the proxy
41 * @a HandleMessage() is processing the given @a message.
42 *
43 * For example:
44 *
45 * \verbatim
46 *
47 * <body>
48 * <object id="plugin"
49 * type="application/x-ppapi-postMessage-example"/>
50 * <script type="text/javascript">
51 * document.getElementById('plugin').postMessage("Hello world!");
52 * </script>
53 * </body>
54 *
55 * \endverbatim
56 *
57 * This will result in HandleMessage being invoked, passing the module
polina 2011/03/22 22:00:59 @a HandleMessage?
dmichael(do not use this one) 2011/03/23 17:03:18 Done.
58 * instance on which it was invoked, with message being a string PP_Var
polina 2011/03/22 22:00:59 @a message?
dmichael(do not use this one) 2011/03/23 17:03:18 Done.
59 * containing "Hello world!".
60 */
61 void (*HandleMessage)(PP_Instance instance, struct PP_Var message);
polina 2011/03/22 22:00:59 I still think that it is unfortunate that we have
dmichael(do not use this one) 2011/03/23 17:03:18 The way I have things organized currently, though,
62 };
63 /**
64 * @}
65 */
66 #endif /* PPAPI_C_DEV_PPP_MESSAGING_DEV_H_ */
67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698