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

Unified Diff: native_client_sdk/src/examples/api/network_monitor/index.html

Issue 100213012: [NaCl SDK] Add NetworkMonitor example. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/api/network_monitor/index.html
diff --git a/native_client_sdk/src/examples/api/network_monitor/index.html b/native_client_sdk/src/examples/api/network_monitor/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..34f1861391ff5c94e8865240a3a539e111e4aff1
--- /dev/null
+++ b/native_client_sdk/src/examples/api/network_monitor/index.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<!--
+Copyright (c) 2013 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.
+-->
+<head>
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Expires" content="-1">
+ <title>{{title}}</title>
+ <script type="text/javascript" src="common.js"></script>
+ <script type="text/javascript" src="example.js"></script>
+ <style>
+ table {
+ border: 1px solid #888;
+ border-collapse: collapse;
+ }
+
+ thead {
+ border-bottom: 1px solid #888;
+ }
+
+ td, th {
+ border-left: 1px solid #888;
+ padding: 4px;
+ }
+ </style>
+</head>
+<body {{attrs}}>
+ <h1>{{title}}</h1>
+ <h2>Status: <code id="statusField">NO-STATUS</code></h2>
+ <p>The network_monitor example demonstrates how to listen for changes to the
+ status of the network interfaces on this computer.<br> This API is normally
+ only available to packaged apps with 'network-state' socket permission,
+ but can be enabled for debugging purposes using the
+ <code>--allow-nacl-socket-api=&lt;hostname&gt;</code> command line
+ flag.<br>
+ </p>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Index</th>
+ <th>Display Name</th>
+ <th>Name</th>
+ <th>Type</th>
+ <th>State</th>
+ <th>IP Addresses</th>
+ <th>MTU</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+
+ <pre id="log" style="font-weight: bold"></pre>
+ <div id="listener"></div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698