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

Side by Side Diff: native_client_sdk/src/doc/devguide/coding/message-system.rst

Issue 25548007: [NaCl Docs] Add a new doc build configuration: devsite-staging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
OLDNEW
1 .. _message-system: 1 .. _message-system:
2 2
3 ################ 3 ################
4 Messaging System 4 Messaging System
5 ################ 5 ################
6 6
7 .. contents:: 7 .. contents::
8 :local: 8 :local:
9 :backlinks: none 9 :backlinks: none
10 :depth: 2 10 :depth: 2
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // This function is called by common.js when a message is received from the 139 // This function is called by common.js when a message is received from the
140 // NaCl module. 140 // NaCl module.
141 function handleMessage(message) { 141 function handleMessage(message) {
142 // In the example, we simply log the data that's received in the message. 142 // In the example, we simply log the data that's received in the message.
143 var logEl = document.getElementById('log'); 143 var logEl = document.getElementById('log');
144 logEl.textContent += message.data; 144 logEl.textContent += message.data;
145 } 145 }
146 146
147 // In the index.html we have set up the appropriate divs: 147 // In the index.html we have set up the appropriate divs:
148 <body {{attrs}}> 148 <body {attrs}>
Sam Clegg 2013/10/02 19:09:12 Devsite can't handle {{ or }} even within <pre> ta
eliben 2013/10/02 19:39:25 I think it's because these are template tags and t
149 <!-- ... --> 149 <!-- ... -->
150 <div id="listener"></div> 150 <div id="listener"></div>
151 <div id="log"></div> 151 <div id="log"></div>
152 </body> 152 </body>
153 153
154 154
155 Step 3: From example.js 155 Step 3: From example.js
156 ^^^^^^^^^^^^^^^^^^^^^^^ 156 ^^^^^^^^^^^^^^^^^^^^^^^
157 157
158 .. naclcode:: 158 .. naclcode::
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 virtual void HandleMessage(const pp::Var& var) { 406 virtual void HandleMessage(const pp::Var& var) {
407 if (var.is_dictionary()) { 407 if (var.is_dictionary()) {
408 pp::VarDictionary dictionary(var); 408 pp::VarDictionary dictionary(var);
409 // Use the dictionary 409 // Use the dictionary
410 pp::VarArray keys = dictionary.GetKeys(); 410 pp::VarArray keys = dictionary.GetKeys();
411 // ... 411 // ...
412 } else { 412 } else {
413 // ... 413 // ...
414 } 414 }
415 } 415 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/doc/devguide/coding/_toc.yaml ('k') | native_client_sdk/src/doc/devguide/devcycle/_toc.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698