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

Side by Side Diff: native_client_sdk/src/examples/demo/nacl_io_demo/index.html

Issue 2156503002: [NaCl SDK] Expose Google Drive to nacl_io. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <!-- 3 <!--
4 Copyright (c) 2012 The Chromium Authors. All rights reserved. 4 Copyright (c) 2016 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>{{title}}</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 <body data-custom-load="true" {{attrs}}> 15 <body data-custom-load="true" {{attrs}}>
16 <h1>{{title}}</h1> 16 <h1>{{title}}</h1>
17 <h2>Status: <code id="statusField">NO-STATUS</code></h2> 17 <h2>Status: <code id="statusField">NO-STATUS</code></h2>
18 <p> 18 <p>
19 This example shows how you can use standard C library file and socket 19 This example shows how you can use standard C library file and socket
20 operation functions in Native Client using a library called nacl_io. 20 operation functions in Native Client using a library called nacl_io.
21 </p> 21 </p>
22 <p> 22 <p>
23 nacl_io provides a virtual filesystem. The filesystem can be "mounted" 23 nacl_io provides a virtual filesystem. The filesystem can be "mounted"
24 in a given directory tree. When you perform operations on files in those 24 in a given directory tree. When you perform operations on files in those
25 directories, the mount determines how those operations should be performed. 25 directories, the mount determines how those operations should be performed.
26 </p> 26 </p>
27 <p> 27 <p>
28 This example has four mounts by default. 28 This example has five mounts by default.
29 <ol> 29 <ol>
30 <li><i>/</i> the root of the filesystem. This is a memory mount, and 30 <li><i>/</i> the root of the filesystem. This is a memory mount, and
31 is non-persistent.</li> 31 is non-persistent.</li>
32 <li><i>/persistent</i> a persistent storage area. Any data written 32 <li><i>/persistent</i> a persistent storage area. Any data written
33 here can be read back after Chrome is restarted.</li> 33 here can be read back after Chrome is restarted.</li>
34 <li><i>/http</i> a mount that can read from a URL. Try reading from 34 <li><i>/http</i> a mount that can read from a URL. Try reading from
35 /http/index.html.</li> 35 /http/index.html.</li>
36 <li><i>/dev</i> a mount containing some utility files. /dev/null, 36 <li><i>/dev</i> a mount containing some utility files. /dev/null,
37 /dev/zero, etc.</li> 37 /dev/zero, etc.</li>
38 <li><i>/googledrive</i> a Google Drive mount.
39 </li>
38 </ol> 40 </ol>
39 </p> 41 </p>
40 <p> 42 <p>
41 nacl_io also provides a (currently incomplete) posix socket api. Like the 43 nacl_io also provides a (currently incomplete) posix socket api. Like the
42 virtual filesystem, it is an abstraction layer on top of ppapi. To use this 44 virtual filesystem, it is an abstraction layer on top of ppapi. To use this
43 API, an app must be a packaged app with the appropriate socket permissions 45 API, an app must be a packaged app with the appropriate socket permissions
44 specified in the manifest file. 46 specified in the manifest file.
45 <hr> 47 <hr>
48 <button id="buttonid" onclick="buttonOnClick()">Sign in</button>
49 <script>
50 executeAfterGettingCode();
51 </script>
52 <hr>
46 <p><b>File Operations:</b></p> 53 <p><b>File Operations:</b></p>
47 <div> 54 <div>
48 <span> 55 <span>
49 <input type="radio" id="radiofopen" name="group" checked="checked">fopen 56 <input type="radio" id="radiofopen" name="group" checked="checked">fopen
50 <input type="radio" id="radiofclose" name="group">fclose 57 <input type="radio" id="radiofclose" name="group">fclose
51 <input type="radio" id="radiofread" name="group">fread 58 <input type="radio" id="radiofread" name="group">fread
52 <input type="radio" id="radiofwrite" name="group">fwrite 59 <input type="radio" id="radiofwrite" name="group">fwrite
53 <input type="radio" id="radiofseek" name="group">fseek 60 <input type="radio" id="radiofseek" name="group">fseek
54 <input type="radio" id="radiofflush" name="group">fflush 61 <input type="radio" id="radiofflush" name="group">fflush
55 <input type="radio" id="radiostat" name="group">stat 62 <input type="radio" id="radiostat" name="group">stat
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 <input type="text" id="pipe_input_box"></p> 260 <input type="text" id="pipe_input_box"></p>
254 <p>Any output from the pipe will be printed below: <textarea id="pipe_output"> </textarea></p> 261 <p>Any output from the pipe will be printed below: <textarea id="pipe_output"> </textarea></p>
255 <hr> 262 <hr>
256 <p><b>Log:</b></p> 263 <p><b>Log:</b></p>
257 <pre id="log" style="font-weight: bold"></pre> 264 <pre id="log" style="font-weight: bold"></pre>
258 <!-- The NaCl plugin will be embedded inside the element with id "listener". 265 <!-- The NaCl plugin will be embedded inside the element with id "listener".
259 See common.js.--> 266 See common.js.-->
260 <div id="listener"></div> 267 <div id="listener"></div>
261 </body> 268 </body>
262 </html> 269 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698