summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 00:26:51 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 00:26:51 +0000
commitc92c75056e673bcaa04683e382414e2fa02aa714 (patch)
tree98b58f310d3dcd58bb840634122b43580159d2de /chrome/browser/resources/net_internals
parentc571c8d87eed98769157c8ca9fec60b5e4d42995 (diff)
downloadchromium_src-c92c75056e673bcaa04683e382414e2fa02aa714.zip
chromium_src-c92c75056e673bcaa04683e382414e2fa02aa714.tar.gz
chromium_src-c92c75056e673bcaa04683e382414e2fa02aa714.tar.bz2
Add a DOMUI datasource that will handle the net-internals page.
Right now it is bound to the temporary URL "chrome://net2", since the frontend is under construction. (Loading this page right now just shows a dummy HTML page.) This change is a first step to transitioning the about:net-internals / about:network pages from C++ to javascript. Note that the network stuff needs to run on the IO thread, however the DOMUI infrastructure is all set up to run on the UI thread. I work around this by proxying things back and forth through the IO thread. Hopefully in subsequent iterations this overhead can be removed, by exposing a sort of "IO thread DOMUI". BUG=37421 Review URL: http://codereview.chromium.org/1036001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/net_internals')
-rw-r--r--chrome/browser/resources/net_internals/index.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/browser/resources/net_internals/index.html b/chrome/browser/resources/net_internals/index.html
new file mode 100644
index 0000000..7aff02c
--- /dev/null
+++ b/chrome/browser/resources/net_internals/index.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <title>Under construction...</title>
+ <script>
+
+// TODO(eroman): This is all temporary...
+
+function sendTestMessageToBrowser() {
+ log("Sent message to browser");
+ chrome.send('testMessage', [String((new Date()).toLocaleTimeString())]);
+}
+
+function log(msg) {
+ var l = document.getElementById('log');
+ l.appendChild(document.createTextNode(msg + "\n"));
+}
+
+ </script>
+ </head>
+
+
+ <body>
+ <p>This is a work in progress. See http://crbug.com/37421 for details.</p>
+
+ <input onclick="sendTestMessageToBrowser()"
+ value="SendTestMessageToBrowser"
+ type=button />
+
+ <pre id=log></pre>
+
+ </body>
+</html>