OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 PPP_Messaging interface containing pointers to | 7 * This file defines the PPP_Messaging interface containing pointers to |
8 * functions that you must implement to handle postMessage messages | 8 * functions that you must implement to handle postMessage messages |
9 * on the associated DOM element. | 9 * on the associated DOM element. |
10 * | 10 * |
(...skipping 23 matching lines...) Expand all Loading... |
34 * @param[in] message A <code>PP_Var</code> containing the data to be sent | 34 * @param[in] message A <code>PP_Var</code> containing the data to be sent |
35 * to JavaScript. Message can have an int32_t, double, bool, or string value | 35 * to JavaScript. Message can have an int32_t, double, bool, or string value |
36 * (objects are not supported). | 36 * (objects are not supported). |
37 * | 37 * |
38 * <strong>Example:</strong> | 38 * <strong>Example:</strong> |
39 * | 39 * |
40 * The following JavaScript code invokes <code>HandleMessage</code>, passing | 40 * The following JavaScript code invokes <code>HandleMessage</code>, passing |
41 * the module instance on which it was invoked, with <code>message</code> | 41 * the module instance on which it was invoked, with <code>message</code> |
42 * being a string <code>PP_Var</code> containing "Hello world!" | 42 * being a string <code>PP_Var</code> containing "Hello world!" |
43 * | 43 * |
44 * @code | 44 * <strong>Example:</strong> |
| 45 * |
| 46 * <code> |
45 * | 47 * |
46 * <body> | 48 * <body> |
47 * <object id="plugin" | 49 * <object id="plugin" |
48 * type="application/x-ppapi-postMessage-example"/> | 50 * type="application/x-ppapi-postMessage-example"/> |
49 * <script type="text/javascript"> | 51 * <script type="text/javascript"> |
50 * document.getElementById('plugin').postMessage("Hello world!"); | 52 * document.getElementById('plugin').postMessage("Hello world!"); |
51 * </script> | 53 * </script> |
52 * </body> | 54 * </body> |
53 * | 55 * |
54 * @endcode | 56 * </code> |
55 * | 57 * |
56 */ | 58 */ |
57 void HandleMessage([in] PP_Instance instance, [in] PP_Var message); | 59 void HandleMessage([in] PP_Instance instance, [in] PP_Var message); |
58 }; | 60 }; |
59 | 61 |
OLD | NEW |