diff options
author | jond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 20:27:10 +0000 |
---|---|---|
committer | jond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 20:27:10 +0000 |
commit | e2c2efabff86f9c0da85b498cbeea3bf052628c4 (patch) | |
tree | 6d4462ebc7d14bad0b05d632febc641f3266fc54 /ppapi/c/ppp_messaging.h | |
parent | f8233cce27cea79cfdcfa3fae485e22c68470435 (diff) | |
download | chromium_src-e2c2efabff86f9c0da85b498cbeea3bf052628c4.zip chromium_src-e2c2efabff86f9c0da85b498cbeea3bf052628c4.tar.gz chromium_src-e2c2efabff86f9c0da85b498cbeea3bf052628c4.tar.bz2 |
Cleaned up PostMessage documentation
Review URL: http://codereview.chromium.org/7062028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/ppp_messaging.h')
-rw-r--r-- | ppapi/c/ppp_messaging.h | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/ppapi/c/ppp_messaging.h b/ppapi/c/ppp_messaging.h index 29a1213..5441a50 100644 --- a/ppapi/c/ppp_messaging.h +++ b/ppapi/c/ppp_messaging.h @@ -13,9 +13,9 @@ struct PP_Var; /** * @file - * This file defines the PPP_Messaging structure - a series of pointers to - * methods that you must implement if you wish to handle messages posted to the - * module instance via calls to postMessage on the associated DOM element. + * This file defines the PPP_Messaging interface containing pointers to + * functions that you must implement to handle postMessage messages + * on the associated DOM element. * */ @@ -24,21 +24,29 @@ struct PP_Var; */ /** - * The PPP_Messaging interface contains pointers to a series of functions - * that you must implement if you wish to handle messages posted to the module - * instance via calls to postMessage on the associated DOM element. + * The PPP_Messaging interface contains pointers to functions that you must + * implement to handle postMessage events on the associated DOM element. */ struct PPP_Messaging { /** - * HandleMessage is a pointer to a function that the browser will call when - * @a postMessage() is invoked on the DOM element for the module instance in - * JavaScript. Note that @a postMessage() in the JavaScript interface is + * HandleMessage is a pointer to a function that the browser calls when + * PostMessage() is invoked on the DOM element for the module instance in + * JavaScript. Note that PostMessage() in the JavaScript interface is * asynchronous, meaning JavaScript execution will not be blocked while - * @a HandleMessage() is processing the given @a message. + * HandleMessage() is processing the message. * - * For example: + * @param[in] instance A PP_Instance indentifying one instance of a module. + * @param[in] message A PP_Var containing the data to be sent to JavaScript. + * Message can have an int32_t, double, bool, or string value (objects + * are not supported). * - * @verbatim + * <strong>Example:</strong> + * + * The following JavaScript code invokes HandleMessage, passing the module + * instance on which it was invoked, with <code>message</code> being a + * string PP_Var containing "Hello world!" + * + * @code * * <body> * <object id="plugin" @@ -48,11 +56,8 @@ struct PPP_Messaging { * </script> * </body> * - * @endverbatim + * @endcode * - * This will result in @a HandleMessage being invoked, passing the module - * instance on which it was invoked, with @a message being a string PP_Var - * containing "Hello world!". */ void (*HandleMessage)(PP_Instance instance, struct PP_Var message); }; |