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

Side by Side Diff: ppapi/api/ppb_messaging.idl

Issue 10236012: Fix small error in code in comment for PostMessage usage. No functional change, just trying to fix … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | ppapi/c/ppb_messaging.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * 44 *
45 * <strong>Example:</strong> 45 * <strong>Example:</strong>
46 * 46 *
47 * @code 47 * @code
48 * 48 *
49 * <body> 49 * <body>
50 * <object id="plugin" 50 * <object id="plugin"
51 * type="application/x-ppapi-postMessage-example"/> 51 * type="application/x-ppapi-postMessage-example"/>
52 * <script type="text/javascript"> 52 * <script type="text/javascript">
53 * var plugin = document.getElementById('plugin'); 53 * var plugin = document.getElementById('plugin');
54 * plugin.AddEventListener("message", 54 * plugin.addEventListener("message",
55 * function(message) { alert(message.data); }, 55 * function(message) { alert(message.data); },
56 * false); 56 * false);
57 * </script> 57 * </script>
58 * </body> 58 * </body>
59 * 59 *
60 * @endcode 60 * @endcode
61 * 61 *
62 * The module instance then invokes PostMessage() as follows: 62 * The module instance then invokes PostMessage() as follows:
63 * 63 *
64 * @code 64 * @code
65 * 65 *
66 * char hello_world[] = "Hello world!"; 66 * char hello_world[] = "Hello world!";
67 * PP_Var hello_var = ppb_var_interface->VarFromUtf8(instance, 67 * PP_Var hello_var = ppb_var_interface->VarFromUtf8(instance,
68 * hello_world, 68 * hello_world,
69 * sizeof(hello_world)); 69 * sizeof(hello_world));
70 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. 70 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var.
71 * ppb_var_interface->Release(hello_var); 71 * ppb_var_interface->Release(hello_var);
72 * 72 *
73 * @endcode 73 * @endcode
74 * 74 *
75 * The browser will pop-up an alert saying "Hello world!" 75 * The browser will pop-up an alert saying "Hello world!"
76 */ 76 */
77 void PostMessage([in] PP_Instance instance, [in] PP_Var message); 77 void PostMessage([in] PP_Instance instance, [in] PP_Var message);
78 }; 78 };
79 79
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/ppb_messaging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698