Index: native_client_sdk/src/examples/demo/googledrivefs_demo/index.html |
diff --git a/native_client_sdk/src/examples/demo/nacl_io_demo/index.html b/native_client_sdk/src/examples/demo/googledrivefs_demo/index.html |
similarity index 59% |
copy from native_client_sdk/src/examples/demo/nacl_io_demo/index.html |
copy to native_client_sdk/src/examples/demo/googledrivefs_demo/index.html |
index bf9d7ea30dc9de448f580398fa05025d1410adfd..08a9f31d7cea60feec6c5acd22ac265067d4cd79 100644 |
--- a/native_client_sdk/src/examples/demo/nacl_io_demo/index.html |
+++ b/native_client_sdk/src/examples/demo/googledrivefs_demo/index.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<html> |
<!-- |
-Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+Copyright (c) 2016 The Chromium Authors. All rights reserved. |
Use of this source code is governed by a BSD-style license that can be |
found in the LICENSE file. |
--> |
@@ -14,34 +14,27 @@ found in the LICENSE file. |
</head> |
<body data-custom-load="true" {{attrs}}> |
<h1>{{title}}</h1> |
- <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
<p> |
- This example shows how you can use standard C library file and socket |
- operation functions in Native Client using a library called nacl_io. |
+ This example shows how you can use standard C++ library files |
+ in Native Client to access Google Drive exposed by a library called nacl_io. |
</p> |
<p> |
- nacl_io provides a virtual filesystem. The filesystem can be "mounted" |
+ nacl_io provides a virtual filesystem. Google Drive can be "mounted" |
in a given directory tree. When you perform operations on files in those |
directories, the mount determines how those operations should be performed. |
</p> |
<p> |
- This example has four mounts by default. |
+ This example has 1 mount by default. Sign in and use the file operations and directory operations. |
<ol> |
- <li><i>/</i> the root of the filesystem. This is a memory mount, and |
- is non-persistent.</li> |
- <li><i>/persistent</i> a persistent storage area. Any data written |
- here can be read back after Chrome is restarted.</li> |
- <li><i>/http</i> a mount that can read from a URL. Try reading from |
- /http/index.html.</li> |
- <li><i>/dev</i> a mount containing some utility files. /dev/null, |
- /dev/zero, etc.</li> |
+ <li><i>/</i> a Google Drive mount. |
+ </li> |
</ol> |
</p> |
- <p> |
- nacl_io also provides a (currently incomplete) posix socket api. Like the |
- virtual filesystem, it is an abstraction layer on top of ppapi. To use this |
- API, an app must be a packaged app with the appropriate socket permissions |
- specified in the manifest file. |
+ <hr> |
+ <button id="buttonid" onclick="buttonOnClick()">Sign in</button> |
+ <script> |
+ executeAfterGettingCode(); |
+ </script> |
<hr> |
<p><b>File Operations:</b></p> |
<div> |
@@ -180,79 +173,6 @@ found in the LICENSE file. |
</span> |
</div> |
<hr> |
- <p><b>Socket Operations:</b></p> |
- <div> |
- <span> |
- <input type="radio" id="radiogethostbyname" name="group">gethostbyname |
- <input type="radio" id="radiogetaddrinfo" name="group">getaddrinfo |
- <input type="radio" id="radioconnect" name="group">connect |
- <input type="radio" id="radiosend" name="group">send |
- <input type="radio" id="radiorecv" name="group">recv |
- <input type="radio" id="radioclose" name="group">close |
- </span> |
- </div> |
- <div class="function" id="gethostbyname" hidden> |
- <span> |
- Hostname: |
- <input type="text" id="gethostbynameName" value="google.com"> |
- <button>gethostbyname</button> |
- </span> |
- </div> |
- <div class="function" id="getaddrinfo" hidden> |
- <span> |
- Hostname: |
- <input type="text" id="getaddrinfoName" value="google.com"> |
- <select id="getaddrinfoFamily"> |
- <option>AF_INET</option> |
- <option>AF_INET6</option> |
- <option>AF_UNSPEC</option> |
- </select> |
- <button>getaddrinfo</button> |
- </span> |
- </div> |
- <div class="function" id="connect" hidden> |
- <span> |
- Host: |
- <input type="text" id="connectHost" value="google.com"> |
- Port: |
- <input type="text" id="connectPort" value="80"> |
- <button>connect</button> |
- </span> |
- </div> |
- <div class="function" id="send" hidden> |
- <span> |
- <select class="sock-handle" id="sendHandle"></select> |
- Message: |
- <input type="text" id="sendMessage" value="Hello!"> |
- <button>send</button> |
- </span> |
- </div> |
- <div class="function" id="recv" hidden> |
- <span> |
- <select class="sock-handle" id="recvHandle"></select> |
- Buffer Size: |
- <input type="text" id="recvBufferSize" value="256"> |
- <button>recv</button> |
- </span> |
- </div> |
- <div class="function" id="close" hidden> |
- <span> |
- <select class="sock-handle" id="closeHandle"></select> |
- <button>close</button> |
- </span> |
- </div> |
- <hr> |
- <p><b>JavaScript Pipe Operations:</b></p> |
- <p>Type input while the focus is on this box the send input to the pipe |
- device: |
- <select id="pipe_name"> |
- <option>jspipe1</option> |
- <option>jspipe2</option> |
- <option>jspipe3</option> |
- </select> |
- <input type="text" id="pipe_input_box"></p> |
- <p>Any output from the pipe will be printed below: <textarea id="pipe_output"></textarea></p> |
- <hr> |
<p><b>Log:</b></p> |
<pre id="log" style="font-weight: bold"></pre> |
<!-- The NaCl plugin will be embedded inside the element with id "listener". |