Chromium Code Reviews| Index: native_client_sdk/src/examples/api/vpn_provider/index.html |
| diff --git a/native_client_sdk/src/examples/api/vpn_provider/index.html b/native_client_sdk/src/examples/api/vpn_provider/index.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c50030d30cfac8885993fb8bc148530616503009 |
| --- /dev/null |
| +++ b/native_client_sdk/src/examples/api/vpn_provider/index.html |
| @@ -0,0 +1,48 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <!-- |
| + Copyright 2015 The Chromium Authors. All rights reserved. |
|
binji
2016/02/24 19:23:09
nit: 2016
|
| + Use of this source code is governed by a BSD-style license that can be |
| + found in the LICENSE file. |
| + --> |
| +<head> |
| + <meta http-equiv="Pragma" content="no-cache"> |
| + <meta http-equiv="Expires" content="-1"> |
| + <title>VPN Provider example</title> |
| + <script type="text/javascript" src="common.js"></script> |
| + <script type="text/javascript" src="example.js"></script> |
| +</head> |
| +<!-- |
|
binji
2016/02/24 19:23:08
remove this, we only include this message in getti
|
| +For the SDK examples, we support several toolchains (e.g. PNaCl, newlib, |
| +GLibC). In your own code, you'll likely just choose one toolchain (probably |
| +PNaCl), and load that directly. |
| + |
| +Rather than have each example repeat the same module loading code for each |
| +toolchain it supports, we set custom data attributes on the body. Those |
| +attributes are read by common.js to determine which toolchains are supported |
| +for the example. |
| +--> |
| +<body data-name="vpn_provider" |
|
binji
2016/02/24 19:23:08
this should be <body {{atrs}}>, take a look at som
|
| + data-tools="pnacl newlib glibc clang-newlib linux" |
| + data-configs="Debug Release" data-path="{tc}/{config}"> |
| + <h1>VPN Provider example</h1> |
| + <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
| + <!-- |
|
binji
2016/02/24 19:23:08
remove this comment
|
| + Just as in part1, the <embed> element will be wrapped inside the <div> |
| + element with the id "listener". In part1, the embed was specified in HTML, |
| + here the common.js module creates a new <embed> element and adds it to the |
| + <div> for us. |
| + --> |
| + <div id="listener"></div> |
| + |
| + <!-- |
| + This element will be populated with the messages that come from the NaCl |
| + module. See example.js. |
| + --> |
| + |
| +<button id="load" onclick="load_me()" >Create</button> |
|
binji
2016/02/24 19:23:09
Add documentation to the page explaining what it i
|
| +<button id="unload" onclick="unload_me()" disabled="true">Destroy</button> |
| + |
| + <div id="log"></div> |
| +</body> |
| +</html> |