Add Chrome Frame support. Close requests in web.py.

- Add meta tag to vnc.html and vnc_auto.html so that if Chrome Frame
  is installed, it is used.

- Add detection to default_controls.js that shows a message with
  a Chrome Frame install link if the user is using a version of IE
  without Canvas support.

- Fix web.py so that requests have their connection closed after they
  are completed.  This has been a bug for a while but it prevents
  Chrome Frame from working because Chrome Frame doesn't activate
  until the initial request connection closes.
This commit is contained in:
Joel Martin 2010-11-09 12:06:03 -06:00
parent 1ee2d93e94
commit e66f3f89f2
4 changed files with 21 additions and 4 deletions

View File

@ -15,12 +15,26 @@ settingsOpen : false,
// Render default controls and initialize settings menu
load: function(target) {
var html, i, DC = DefaultControls, sheet, sheets, llevels;
var html = '', i, DC = DefaultControls, sheet, sheets, llevels;
/* Populate the 'target' DOM element with default controls */
if (!target) { target = 'vnc'; }
html = "";
if ((!document.createElement('canvas').getContext) &&
window.ActiveXObject) {
// Suggest Chrome frame for Internet Explorer users
html += '<center><div style="text-align: left; width: 400px">';
html += ' You are using a version of Internet Explorer ';
html += ' that does not have HTML5 Canvas support. ';
html += ' To use noVNC you must use a browser with HTML5 ';
html += ' Canvas support or install ';
html += ' <a href="http://google.com/chromeframe" target="cframe">';
html += ' Google Chrome Frame.</a>';
html += '</div></center>';
$(target).innerHTML = html;
return;
}
html += '<div id="VNC_controls">';
html += ' <ul>';
html += ' <li>Host: <input id="VNC_host"></li>';

View File

@ -17,6 +17,7 @@ import SimpleHTTPServer as server # python 2.X
def do_request(connstream, from_addr):
x = object()
server.SimpleHTTPRequestHandler(connstream, from_addr, x)
connstream.close()
def serve():
bindsocket = socket.socket()

View File

@ -5,7 +5,8 @@
Licensed under LGPL-3 (see LICENSE.txt)
-->
<head>
<title>VNC Client</title>
<title>noVNC</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="include/plain.css">
<link rel="alternate stylesheet" href="include/black.css" TITLE="Black">
<!--

View File

@ -8,7 +8,8 @@
http://example.com/?host=HOST&port=PORT&encrypt=1&true_color=1
-->
<head>
<title>VNC Client</title>
<title>noVNC</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="include/plain.css" title="plain">
<!--
<script type='text/javascript'