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 <code>PPB_Messaging</code> interface implemented | 7 * This file defines the <code>PPB_Messaging</code> interface implemented |
8 * by the browser for sending messages to DOM elements associated with a | 8 * by the browser for sending messages to DOM elements associated with a |
9 * specific module instance. | 9 * specific module instance. |
10 */ | 10 */ |
11 | 11 |
12 label Chrome { | 12 label Chrome { |
13 M13 = 0.1, | |
14 M14 = 1.0 | 13 M14 = 1.0 |
15 }; | 14 }; |
16 | 15 |
17 /** | 16 /** |
18 * The <code>PPB_Messaging</code> interface is implemented by the browser | 17 * The <code>PPB_Messaging</code> interface is implemented by the browser |
19 * and is related to sending messages to JavaScript message event listeners on | 18 * and is related to sending messages to JavaScript message event listeners on |
20 * the DOM element associated with specific module instance. | 19 * the DOM element associated with specific module instance. |
21 */ | 20 */ |
22 [version=0.1] | |
23 interface PPB_Messaging { | 21 interface PPB_Messaging { |
24 /** | 22 /** |
25 * PostMessage() asynchronously invokes any listeners for message events on | 23 * PostMessage() asynchronously invokes any listeners for message events on |
26 * the DOM element for the given module instance. A call to PostMessage() | 24 * the DOM element for the given module instance. A call to PostMessage() |
27 * will not block while the message is processed. | 25 * will not block while the message is processed. |
28 * | 26 * |
29 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 27 * @param[in] instance A <code>PP_Instance</code> indentifying one instance |
30 * of a module. | 28 * of a module. |
31 * @param[in] message A <code>PP_Var</code> containing the data to be sent to | 29 * @param[in] message A <code>PP_Var</code> containing the data to be sent to |
32 * JavaScript. | 30 * JavaScript. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. | 71 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. |
74 * ppb_var_interface->Release(hello_var); | 72 * ppb_var_interface->Release(hello_var); |
75 * | 73 * |
76 * @endcode | 74 * @endcode |
77 * | 75 * |
78 * The browser will pop-up an alert saying "Hello world!" | 76 * The browser will pop-up an alert saying "Hello world!" |
79 */ | 77 */ |
80 void PostMessage([in] PP_Instance instance, [in] PP_Var message); | 78 void PostMessage([in] PP_Instance instance, [in] PP_Var message); |
81 }; | 79 }; |
82 | 80 |
OLD | NEW |