summaryrefslogtreecommitdiffstats
path: root/remoting/tools
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:10:41 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:10:41 +0000
commit264a4883bdd91b50b1e83499a48321c096bdaa5e (patch)
tree8783798efe29534243feb856d435ca13a0c392b7 /remoting/tools
parent53af568e133242dd1412073caea1f95b8b4743fd (diff)
downloadchromium_src-264a4883bdd91b50b1e83499a48321c096bdaa5e.zip
chromium_src-264a4883bdd91b50b1e83499a48321c096bdaa5e.tar.gz
chromium_src-264a4883bdd91b50b1e83499a48321c096bdaa5e.tar.bz2
Rudamentary Chrome extension version of the chromoting client UI.
This implements a bare-bones interface to starting a chromoting client session. It currently loads the plugin within the popup itself which is bad, but at least it works as a proof of concept. BUG=50248 TEST=runs and connects locally. Review URL: http://codereview.chromium.org/3046045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rw-r--r--remoting/tools/client.html30
-rw-r--r--remoting/tools/client.js39
2 files changed, 0 insertions, 69 deletions
diff --git a/remoting/tools/client.html b/remoting/tools/client.html
deleted file mode 100644
index 2f25c7d..0000000
--- a/remoting/tools/client.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-Copyright (c) 2010 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.
--->
-
-<html>
- <head>
- <script type="text/javascript" src="client.js"></script>
- <title>Get hosts</title>
- </head>
- <body onload="init_params();">
- <form name="connectparams" action="" method="GET">
- <input type="text" name="username" value="" />
- <input type="text" name="host_jid" value="" />
- <input type="text" name="auth_token" value="" />
- <input type="button" name="connect" value="Connect" onclick="do_connect(this.form)" />
- </form>
-
- <div id="debug_div" style="border: red 1px solid;">
- -- Debugging messages go here --
- </div>
-
- <br />
-
- <div id="plugin_div" style="border: black 1px dashed;">
- <embed name="chromoting" src="chrome://remoting" type="pepper-application/x-chromoting">
- </div>
- </body>
-</html>
diff --git a/remoting/tools/client.js b/remoting/tools/client.js
deleted file mode 100644
index 1038c32..0000000
--- a/remoting/tools/client.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2010 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.
-
-function init_params() {
- var hash;
- var hashes = window.location.href.slice(
- window.location.href.indexOf('?') + 1).split('&');
- var connect_params = document.forms[0];
- for(var i = 0; i < hashes.length; i++)
- {
- hash = hashes[i].split('=');
- if (hash[0] == "username") {
- connect_params.username.value = hash[1];
- } else if (hash[0] == "host_jid") {
- connect_params.host_jid.value = hash[1];
- } else if (hash[0] == "auth_token") {
- connect_params.auth_token.value = hash[1];
- }
- }
-}
-
-function do_connect(form) {
- debug_output("Attempt to connect with " +
- "username='" + form.username.value + "'" +
- " host_jid='" + form.host_jid.value + "'" +
- " auth_token='" + form.auth_token.value + "'");
-
- document.chromoting.connect(form.username.value, form.host_jid.value, form.auth_token.value);
-}
-
-function debug_output(message) {
- var debug_div = document.getElementById('debug_div');
- var message_node = document.createElement('p');
- message_node.innerText = message;
-
- debug_div.appendChild(message_node);
-}
-