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 * |
11 */ | 11 */ |
12 | 12 |
13 label Chrome { | 13 label Chrome { |
14 M13 = 0.1, | |
15 M14 = 1.0 | 14 M14 = 1.0 |
16 }; | 15 }; |
17 | 16 |
18 /** | 17 /** |
19 * The <code>PPP_Messaging</code> interface contains pointers to functions | 18 * The <code>PPP_Messaging</code> interface contains pointers to functions |
20 * that you must implement to handle postMessage events on the associated | 19 * that you must implement to handle postMessage events on the associated |
21 * DOM element. | 20 * DOM element. |
22 */ | 21 */ |
23 [version=0.1] | |
24 interface PPP_Messaging { | 22 interface PPP_Messaging { |
25 /** | 23 /** |
26 * HandleMessage() is a function that the browser calls when PostMessage() | 24 * HandleMessage() is a function that the browser calls when PostMessage() |
27 * is invoked on the DOM element for the module instance in JavaScript. Note | 25 * is invoked on the DOM element for the module instance in JavaScript. Note |
28 * that PostMessage() in the JavaScript interface is asynchronous, meaning | 26 * that PostMessage() in the JavaScript interface is asynchronous, meaning |
29 * JavaScript execution will not be blocked while HandleMessage() is | 27 * JavaScript execution will not be blocked while HandleMessage() is |
30 * processing the message. | 28 * processing the message. |
31 * | 29 * |
32 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 30 * @param[in] instance A <code>PP_Instance</code> indentifying one instance |
33 * of a module. | 31 * of a module. |
(...skipping 16 matching lines...) Expand all Loading... |
50 * document.getElementById('plugin').postMessage("Hello world!"); | 48 * document.getElementById('plugin').postMessage("Hello world!"); |
51 * </script> | 49 * </script> |
52 * </body> | 50 * </body> |
53 * | 51 * |
54 * @endcode | 52 * @endcode |
55 * | 53 * |
56 */ | 54 */ |
57 void HandleMessage([in] PP_Instance instance, [in] PP_Var message); | 55 void HandleMessage([in] PP_Instance instance, [in] PP_Var message); |
58 }; | 56 }; |
59 | 57 |
OLD | NEW |