You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2010/11/04 22:28:50 UTC

svn commit: r1031262 [24/24] - in /incubator/ace/trunk/ace-webui-vaadin: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/ace/ src/main/java/org/apache/ace/webui/ src/main/java/org/apache/ace/webui/...

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DE709C1CAB0F65BCC5BEF11EDA73A925.cache.png
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DE709C1CAB0F65BCC5BEF11EDA73A925.cache.png?rev=1031262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DE709C1CAB0F65BCC5BEF11EDA73A925.cache.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DF7764EEC1903CD03C9545B354D8D8E4.cache.png
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DF7764EEC1903CD03C9545B354D8D8E4.cache.png?rev=1031262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/DF7764EEC1903CD03C9545B354D8D8E4.cache.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/E44767377485D18D6B6864F65BA8EF73.cache.png
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/E44767377485D18D6B6864F65BA8EF73.cache.png?rev=1031262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/E44767377485D18D6B6864F65BA8EF73.cache.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/EDC7827FEEA59EE44AD790B1C6430C45.cache.png
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/EDC7827FEEA59EE44AD790B1C6430C45.cache.png?rev=1031262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/EDC7827FEEA59EE44AD790B1C6430C45.cache.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/clear.cache.gif
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/clear.cache.gif?rev=1031262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/clear.cache.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?rev=1031262&view=auto
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js (added)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js Thu Nov  4 21:28:26 2010
@@ -0,0 +1,11 @@
+function com_vaadin_terminal_gwt_DefaultWidgetSet(){var M='',nb='" for "gwt:onLoadErrorFn"',lb='" for "gwt:onPropertyErrorFn"',Y='"><\/script>',$='#',Lb='.cache.html',ab='/',Fb='105F20A84B1142C2FD546734F1F914C8',Gb='2253BD23AD27982D4CE4E1D4D47BBB57',Hb='7120F005D2B82FC431A1CDC141E252B2',Nb='<script defer="defer">com_vaadin_terminal_gwt_DefaultWidgetSet.onInjectionDone(\'com.vaadin.terminal.gwt.DefaultWidgetSet\')<\/script>',X='<script id="',ib='=',_='?',Ib='AB1067433E20F359D3956C50BFE51969',kb='Bad handler "',Jb='D4EFE657A170BDE53FD3B91A9B85C9EF',Kb='DB5A1CD0FC7C4B301AE9760611FF5B6B',Mb='DOMContentLoaded',Z='SCRIPT',W='__gwt_marker_com.vaadin.terminal.gwt.DefaultWidgetSet',bb='base',Q='begin',P='bootstrap',db='clear.cache.gif',N='com.vaadin.terminal.gwt.DefaultWidgetSet',hb='content',V='end',zb='gecko',Ab='gecko1_8',R='gwt.codesvr=',S='gwt.hosted=',T='gwt.hybrid',mb='gwt:onLoadErrorFn',jb='gwt:onPropertyErrorFn',gb='gwt:property',Db='hosted.html?com_vaadin_terminal_gwt_Defau
 ltWidgetSet',yb='ie6',xb='ie8',ob='iframe',cb='img',pb="javascript:''",Cb='loadExternalRefs',eb='meta',rb='moduleRequested',U='moduleStartup',wb='msie',fb='name',tb='opera',qb='position:absolute;width:0;height:0;border:none',vb='safari',Eb='selectingPermutation',O='startup',Bb='unknown',sb='user.agent',ub='webkit';var k=window,l=document,m=k.__gwtStatsEvent?function(a){return k.__gwtStatsEvent(a)}:null,n=k.__gwtStatsSessionId?k.__gwtStatsSessionId:null,o,p,q,r=M,s={},t=[],u=[],v=[],w,x;m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:P,millis:(new Date).getTime(),type:Q});if(!k.__gwt_stylesLoaded){k.__gwt_stylesLoaded={}}if(!k.__gwt_scriptsLoaded){k.__gwt_scriptsLoaded={}}function y(){var b=false;try{var c=k.location.search;return (c.indexOf(R)!=-1||(c.indexOf(S)!=-1||k.external&&k.external.gwtOnLoad))&&c.indexOf(T)==-1}catch(a){}y=function(){return b};return b}
+function z(){if(o&&p){var b=l.getElementById(N);var c=b.contentWindow;if(y()){c.__gwt_getProperty=function(a){return F(a)}}com_vaadin_terminal_gwt_DefaultWidgetSet=null;c.gwtOnLoad(w,N,r);m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:U,millis:(new Date).getTime(),type:V})}}
+function A(){var e,f=W,g;l.write(X+f+Y);g=l.getElementById(f);e=g&&g.previousSibling;while(e&&e.tagName!=Z){e=e.previousSibling}function h(a){var b=a.lastIndexOf($);if(b==-1){b=a.length}var c=a.indexOf(_);if(c==-1){c=a.length}var d=a.lastIndexOf(ab,Math.min(c,b));return d>=0?a.substring(0,d+1):M}
+;if(e&&e.src){r=h(e.src)}if(r==M){var i=l.getElementsByTagName(bb);if(i.length>0){r=i[i.length-1].href}else{r=h(l.location.href)}}else if(r.match(/^\w+:\/\//)){}else{var j=l.createElement(cb);j.src=r+db;r=h(j.src)}if(g){g.parentNode.removeChild(g)}}
+function B(){var b=document.getElementsByTagName(eb);for(var c=0,d=b.length;c<d;++c){var e=b[c],f=e.getAttribute(fb),g;if(f){if(f==gb){g=e.getAttribute(hb);if(g){var h,i=g.indexOf(ib);if(i>=0){f=g.substring(0,i);h=g.substring(i+1)}else{f=g;h=M}s[f]=h}}else if(f==jb){g=e.getAttribute(hb);if(g){try{x=eval(g)}catch(a){alert(kb+g+lb)}}}else if(f==mb){g=e.getAttribute(hb);if(g){try{w=eval(g)}catch(a){alert(kb+g+nb)}}}}}}
+function E(a,b){var c=v;for(var d=0,e=a.length-1;d<e;++d){c=c[a[d]]||(c[a[d]]=[])}c[a[e]]=b}
+function F(a){var b=u[a](),c=t[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(x){x(a,d,b)}throw null}
+var G;function H(){if(!G){G=true;var a=l.createElement(ob);a.src=pb;a.id=N;a.style.cssText=qb;a.tabIndex=-1;l.body.appendChild(a);m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:U,millis:(new Date).getTime(),type:rb});a.contentWindow.location.replace(r+J)}}
+u[sb]=function(){var b=navigator.userAgent.toLowerCase();var c=function(a){return parseInt(a[1])*1000+parseInt(a[2])};if(b.indexOf(tb)!=-1){return tb}else if(b.indexOf(ub)!=-1){return vb}else if(b.indexOf(wb)!=-1){if(document.documentMode>=8){return xb}else{var d=/msie ([0-9]+)\.([0-9]+)/.exec(b);if(d&&d.length==3){var e=c(d);if(e>=6000){return yb}}}}else if(b.indexOf(zb)!=-1){var d=/rv:([0-9]+)\.([0-9]+)/.exec(b);if(d&&d.length==3){if(c(d)>=1008)return Ab}return zb}return Bb};t[sb]={gecko:0,gecko1_8:1,ie6:2,ie8:3,opera:4,safari:5};com_vaadin_terminal_gwt_DefaultWidgetSet.onScriptLoad=function(){if(G){p=true;z()}};com_vaadin_terminal_gwt_DefaultWidgetSet.onInjectionDone=function(){o=true;m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:Cb,millis:(new Date).getTime(),type:V});z()};A();var I;var J;if(y()){if(k.external&&(k.external.initModule&&k.external.initModule(N))){k.location.reload();return}J=Db;I=M}B();m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:P,millis:(new
  Date).getTime(),type:Eb});if(!y()){try{E([vb],Fb);E([tb],Gb);E([yb],Hb);E([zb],Ib);E([Ab],Jb);E([xb],Kb);I=v[F(sb)];J=I+Lb}catch(a){return}}var K;function L(){if(!q){q=true;z();if(l.removeEventListener){l.removeEventListener(Mb,L,false)}if(K){clearInterval(K)}}}
+if(l.addEventListener){l.addEventListener(Mb,function(){H();L()},false)}var K=setInterval(function(){if(/loaded|complete/.test(l.readyState)){H();L()}},50);m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:P,millis:(new Date).getTime(),type:V});m&&m({moduleName:N,sessionId:n,subSystem:O,evtGroup:Cb,millis:(new Date).getTime(),type:Q});l.write(Nb)}
+com_vaadin_terminal_gwt_DefaultWidgetSet();
\ No newline at end of file

Added: incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/hosted.html
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/hosted.html?rev=1031262&view=auto
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/hosted.html (added)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/resources/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/hosted.html Thu Nov  4 21:28:26 2010
@@ -0,0 +1,333 @@
+<html>
+<head><script>
+var $wnd = parent;
+var $doc = $wnd.document;
+var $moduleName, $moduleBase, $entry
+,$stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null
+,$sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
+// Lightweight metrics
+if ($stats) {
+  var moduleFuncName = location.search.substr(1);
+  var moduleFunc = $wnd[moduleFuncName];
+  var moduleName = moduleFunc ? moduleFunc.moduleName : "unknown";
+  $stats({moduleName:moduleName,sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
+}
+var $hostedHtmlVersion="2.0";
+
+var gwtOnLoad;
+var $hosted = "localhost:9997";
+
+function loadIframe(url) {
+  var topDoc = window.top.document;
+
+  // create an iframe
+  var iframeDiv = topDoc.createElement("div");
+  iframeDiv.innerHTML = "<iframe scrolling=no frameborder=0 src='" + url + "'>";
+  var iframe = iframeDiv.firstChild;
+  
+  // mess with the iframe style a little
+  var iframeStyle = iframe.style;
+  iframeStyle.position = "absolute";
+  iframeStyle.borderWidth = "0";
+  iframeStyle.left = "0";
+  iframeStyle.top = "0";
+  iframeStyle.width = "100%";
+  iframeStyle.backgroundColor = "#ffffff";
+  iframeStyle.zIndex = "1";
+  iframeStyle.height = "100%";
+
+  // update the top window's document's body's style
+  var hostBodyStyle = window.top.document.body.style; 
+  hostBodyStyle.margin = "0";
+  hostBodyStyle.height = iframeStyle.height;
+  hostBodyStyle.overflow = "hidden";
+
+  // insert the iframe
+  topDoc.body.insertBefore(iframe, topDoc.body.firstChild);
+}
+
+var ua = navigator.userAgent.toLowerCase();
+if (ua.indexOf("gecko") != -1) {
+  // install eval wrapper on FF to avoid EvalError problem
+  var __eval = window.eval;
+  window.eval = function(s) {
+    return __eval(s);
+  }
+}
+if (ua.indexOf("chrome") != -1) {
+  // work around __gwt_ObjectId appearing in JS objects
+  var hop = Object.prototype.hasOwnProperty;
+  Object.prototype.hasOwnProperty = function(prop) {
+    return prop != "__gwt_ObjectId" && hop.call(this, prop);
+  };
+}
+
+// wrapper to call JS methods, which we need both to be able to supply a
+// different this for method lookup and to get the exception back
+function __gwt_jsInvoke(thisObj, methodName) {
+  try {
+    var args = Array.prototype.slice.call(arguments, 2);
+    return [0, window[methodName].apply(thisObj, args)];
+  } catch (e) {
+    return [1, e];
+  }
+}
+
+var __gwt_javaInvokes = [];
+function __gwt_makeJavaInvoke(argCount) {
+  return __gwt_javaInvokes[argCount] || __gwt_doMakeJavaInvoke(argCount);
+}
+
+function __gwt_doMakeJavaInvoke(argCount) {
+  // IE6 won't eval() anonymous functions except as r-values
+  var argList = "";
+  for (var i = 0; i < argCount; i++) {
+    argList += ",p" + i;
+  }
+  var argListNoComma = argList.substring(1);
+
+  return eval(
+    "__gwt_javaInvokes[" + argCount + "] =\n" +
+    "  function(thisObj, dispId" + argList + ") {\n" +
+    "    var result = __static(dispId, thisObj" + argList + ");\n" +
+    "    if (result[0]) {\n" +
+    "      throw result[1];\n" +
+    "    } else {\n" +
+    "      return result[1];\n" +
+    "    }\n" +
+    "  }\n"
+  ); 
+}
+
+/*
+ * This is used to create tear-offs of Java methods.  Each function corresponds
+ * to exactly one dispId, and also embeds the argument count.  We get the "this"
+ * value from the context in which the function is being executed.
+ * Function-object identity is preserved by caching in a sparse array.
+ */
+var __gwt_tearOffs = [];
+var __gwt_tearOffGenerators = [];
+function __gwt_makeTearOff(proxy, dispId, argCount) {
+  return __gwt_tearOffs[dispId] || __gwt_doMakeTearOff(dispId, argCount);
+}
+
+function __gwt_doMakeTearOff(dispId, argCount) {
+  return __gwt_tearOffs[dispId] = 
+      (__gwt_tearOffGenerators[argCount] || __gwt_doMakeTearOffGenerator(argCount))(dispId);
+}
+
+function __gwt_doMakeTearOffGenerator(argCount) {
+  // IE6 won't eval() anonymous functions except as r-values
+  var argList = "";
+  for (var i = 0; i < argCount; i++) {
+    argList += ",p" + i;
+  }
+  var argListNoComma = argList.substring(1);
+
+  return eval(
+    "__gwt_tearOffGenerators[" + argCount + "] =\n" +
+    "  function(dispId) {\n" +
+    "    return function(" + argListNoComma + ") {\n" +
+    "      var result = __static(dispId, this" + argList + ");\n" +
+    "      if (result[0]) {\n" +
+    "        throw result[1];\n" +
+    "      } else {\n" +
+    "        return result[1];\n" +
+    "      }\n" +
+    "    }\n" +
+    "  }\n"
+  ); 
+}
+
+function __gwt_makeResult(isException, result) {
+  return [isException, result];
+}
+
+function __gwt_disconnected() {
+  // Prevent double-invocation.
+  window.__gwt_disconnected = new Function();
+  // Do it in a timeout so we can be sure we have a clean stack.
+  window.setTimeout(__gwt_disconnected_impl, 1);
+}
+
+function __gwt_disconnected_impl() {
+  var topWin = window.top;
+  var topDoc = topWin.document;
+  var outer = topDoc.createElement("div");
+  // Do not insert whitespace or outer.firstChild will get a text node.
+  outer.innerHTML = 
+    '<div style="position:absolute;z-index:2147483646;left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=75);opacity:0.75;background-color:#000000;"></div>' +
+    '<div style="position:absolute;z-index:2147483647;left:50px;top:50px;width:600px;color:#FFFFFF;font-family:verdana;">' +
+      '<div style="font-size:30px;font-weight:bold;">GWT Code Server Disconnected</div>' +
+      '<p style="font-size:15px;"> Most likely, you closed GWT development mode. Or you might have lost network connectivity. To fix this, try restarting GWT Development Mode and <a style="color: #FFFFFF; font-weight: bold;" href="javascript:location.reload()">REFRESH</a> this page.</p>' +
+    '</div>'
+  ;
+  topDoc.body.appendChild(outer);
+  var glass = outer.firstChild;
+  var glassStyle = glass.style;
+
+  // Scroll to the top and remove scrollbars.
+  topWin.scrollTo(0, 0);
+  if (topDoc.compatMode == "BackCompat") {
+    topDoc.body.style["overflow"] = "hidden";
+  } else {
+    topDoc.documentElement.style["overflow"] = "hidden";
+  }
+
+  // Steal focus.
+  glass.focus();
+
+  if ((navigator.userAgent.indexOf("MSIE") >= 0) && (topDoc.compatMode == "BackCompat")) {
+    // IE quirks mode doesn't support right/bottom, but does support this.
+    glassStyle.width = "125%";
+    glassStyle.height = "100%";
+  } else if (navigator.userAgent.indexOf("MSIE 6") >= 0) {
+    // IE6 doesn't have a real standards mode, so we have to use hacks.
+    glassStyle.width = "125%"; // Get past scroll bar area.
+    // Nasty CSS; onresize would be better but the outer window won't let us add a listener IE.
+    glassStyle.setExpression("height", "document.documentElement.clientHeight");
+  }
+}
+
+function findPluginObject() {
+  try {
+    return document.getElementById('pluginObject');
+  } catch (e) {
+    return null;
+  }
+}
+
+function findPluginEmbed() {
+  try {
+    return document.getElementById('pluginEmbed')
+  } catch (e) {
+    return null;
+  }
+}
+
+function findPluginXPCOM() {
+  try {
+    return __gwt_HostedModePlugin;
+  } catch (e) {
+    return null;
+  }
+}
+
+gwtOnLoad = function(errFn, modName, modBase){
+  $moduleName = modName;
+  $moduleBase = modBase;
+
+  // Note that the order is important
+  var pluginFinders = [
+    findPluginXPCOM,
+    findPluginObject,
+    findPluginEmbed,
+  ];
+  var topWin = window.top;
+  var url = topWin.location.href;
+  if (!topWin.__gwt_SessionID) {
+    var ASCII_EXCLAMATION = 33;
+    var ASCII_TILDE = 126;
+    var chars = [];
+    for (var i = 0; i < 16; ++i) {
+      chars.push(Math.floor(ASCII_EXCLAMATION
+          + Math.random() * (ASCII_TILDE - ASCII_EXCLAMATION + 1)));
+    }
+    topWin.__gwt_SessionID = String.fromCharCode.apply(null, chars);
+  }
+  var plugin = null;
+  for (var i = 0; i < pluginFinders.length; ++i) {
+    try {
+      var maybePlugin = pluginFinders[i]();
+      if (maybePlugin != null && maybePlugin.init(window)) {
+        plugin = maybePlugin;
+        break;
+      }
+    } catch (e) {
+    }
+  }
+  if (!plugin) {
+    // try searching for a v1 plugin for backwards compatibility
+    var found = false;
+    for (var i = 0; i < pluginFinders.length; ++i) {
+      try {
+        plugin = pluginFinders[i]();
+        if (plugin != null && plugin.connect($hosted, $moduleName, window)) {
+          return;
+        }
+      } catch (e) {
+      }
+    }
+    loadIframe("http://gwt.google.com/missing-plugin");
+  } else {
+    if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName,
+        $hostedHtmlVersion)) {
+      window.onUnload = function() {
+        try {
+          // wrap in try/catch since plugins are not required to supply this
+          plugin.disconnect();
+        } catch (e) {
+        }
+      };
+    } else {
+      if (errFn) {
+        errFn(modName);
+      } else {
+        alert("Plugin failed to connect to hosted mode server at " + $hosted);
+        loadIframe("http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM");
+      }
+    }
+  }
+}
+
+window.onunload = function() {
+};
+
+// Lightweight metrics
+window.fireOnModuleLoadStart = function(className) {
+  $stats && $stats({moduleName:$moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date()).getTime(), type:'onModuleLoadStart', className:className});
+};
+
+window.__gwt_module_id = 0;
+</script></head>
+<body>
+<font face='arial' size='-1'>This html file is for hosted mode support.</font>
+<script><!--
+// Lightweight metrics
+$stats && $stats({moduleName:$moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date()).getTime(), type:'moduleEvalEnd'});
+
+// OOPHM currently only supports IFrameLinker
+var query = parent.location.search;
+if (!findPluginXPCOM()) {
+  document.write('<embed id="pluginEmbed" type="application/x-gwt-hosted-mode" width="10" height="10">');
+  document.write('</embed>');
+  document.write('<object id="pluginObject" CLASSID="CLSID:1D6156B6-002B-49E7-B5CA-C138FB843B4E">');
+  document.write('</object>');
+}
+
+// look for the old query parameter if we don't find the new one
+var idx = query.indexOf("gwt.codesvr=");
+if (idx >= 0) {
+  idx += 12;  // "gwt.codesvr=".length() == 12
+} else {
+  idx = query.indexOf("gwt.hosted=");
+  if (idx >= 0) {
+    idx += 11;  // "gwt.hosted=".length() == 11
+  }
+}
+if (idx >= 0) {
+  var amp = query.indexOf("&", idx);
+  if (amp >= 0) {
+    $hosted = query.substring(idx, amp);
+  } else {
+    $hosted = query.substring(idx);
+  }
+
+  // According to RFC 3986, some of this component's characters (e.g., ':')
+  // are reserved and *may* be escaped.
+  $hosted = decodeURIComponent($hosted);
+}
+
+query = window.location.search.substring(1);
+if (query && $wnd[query]) setTimeout($wnd[query].onScriptLoad, 1);
+--></script></body></html>