OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <!-- | 3 <!-- |
4 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 4 Copyright 2015 The Chromium Authors. All rights reserved. |
5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
6 found in the LICENSE file. | 6 found in the LICENSE file. |
7 --> | 7 --> |
8 <head> | 8 <head> |
9 <meta http-equiv="Pragma" content="no-cache"> | 9 <meta http-equiv="Pragma" content="no-cache"> |
10 <meta http-equiv="Expires" content="-1"> | 10 <meta http-equiv="Expires" content="-1"> |
11 <title>{{title}}</title> | 11 <title>VPN Provider example</title> |
12 <script type="text/javascript" src="common.js"></script> | 12 <script type="text/javascript" src="common.js"></script> |
13 <script type="text/javascript" src="example.js"></script> | 13 <script type="text/javascript" src="example.js"></script> |
14 </head> | 14 </head> |
15 <!-- | 15 <!-- |
16 For the SDK examples, we support several toolchains (e.g. PNaCl, newlib, | 16 For the SDK examples, we support several toolchains (e.g. PNaCl, newlib, |
17 GLibC). In your own code, you'll likely just choose one toolchain (probably | 17 GLibC). In your own code, you'll likely just choose one toolchain (probably |
18 PNaCl), and load that directly. | 18 PNaCl), and load that directly. |
19 | 19 |
20 Rather than have each example repeat the same module loading code for each | 20 Rather than have each example repeat the same module loading code for each |
21 toolchain it supports, we set custom data attributes on the body. Those | 21 toolchain it supports, we set custom data attributes on the body. Those |
22 attributes are read by common.js to determine which toolchains are supported | 22 attributes are read by common.js to determine which toolchains are supported |
23 for the example. | 23 for the example. |
24 --> | 24 --> |
25 <body {{attrs}}> | 25 <body data-name="vpn_provider" |
26 <h1>{{title}}</h1> | 26 data-tools="pnacl newlib glibc clang-newlib linux" |
| 27 data-configs="Debug Release" data-path="{tc}/{config}"> |
| 28 <h1>VPN Provider example</h1> |
27 <h2>Status: <code id="statusField">NO-STATUS</code></h2> | 29 <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
28 <!-- | 30 <!-- |
29 Just as in part1, the <embed> element will be wrapped inside the <div> | 31 Just as in part1, the <embed> element will be wrapped inside the <div> |
30 element with the id "listener". In part1, the embed was specified in HTML, | 32 element with the id "listener". In part1, the embed was specified in HTML, |
31 here the common.js module creates a new <embed> element and adds it to the | 33 here the common.js module creates a new <embed> element and adds it to the |
32 <div> for us. | 34 <div> for us. |
33 --> | 35 --> |
34 <div id="listener"></div> | 36 <div id="listener"></div> |
35 | 37 |
36 <!-- | 38 <!-- |
37 This element will be populated with the messages that come from the NaCl | 39 This element will be populated with the messages that come from the NaCl |
38 module. See example.js. | 40 module. See example.js. |
39 --> | 41 --> |
| 42 |
| 43 <button id="load" onclick="load_me()" >Create</button> |
| 44 <button id="unload" onclick="unload_me()" disabled="true">Destroy</button> |
| 45 |
40 <div id="log"></div> | 46 <div id="log"></div> |
41 </body> | 47 </body> |
42 </html> | 48 </html> |
OLD | NEW |