diff --git a/browser/base/content/aboutRobots.xhtml b/browser/base/content/aboutRobots.xhtml new file mode 100644 index 000000000000..bd7b699e5c82 --- /dev/null +++ b/browser/base/content/aboutRobots.xhtml @@ -0,0 +1,130 @@ + + +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License +# Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is netError.xhtml. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Adam Lock +# William R. Price +# Henrik Skupin +# Jeff Walden +# Johnathan Nightingale +# Justin Dolske +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** --> + + + %htmlDTD; + + %netErrorDTD; + + %globalDTD; + + %aboutrobotsDTD; +]> + + + + &robots.pagetitle; + + + + + + + + + +
+ + +
+

&robots.errorTitleText;

+
+ + +
+ + +
+

&robots.errorShortDescText;

+
+ + +
+
    +
  • &robots.errorLongDesc1;
  • +
  • &robots.errorLongDesc2;
  • +
  • &robots.errorLongDesc3;
  • +
  • &robots.errorLongDesc4;
  • +
+
+ + +
+

&robots.errorTrailerDescText;

+
+ +
+ + + + +
+ + + diff --git a/browser/base/jar.mn b/browser/base/jar.mn index f5fd20c80720..5cb58bc4b396 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -13,6 +13,7 @@ browser.jar: * content/browser/aboutDialog.xul (content/aboutDialog.xul) * content/browser/aboutDialog.js (content/aboutDialog.js) content/browser/aboutDialog.css (content/aboutDialog.css) +* content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml) * content/browser/browser.css (content/browser.css) * content/browser/browser.js (content/browser.js) * content/browser/browser.xul (content/browser.xul) diff --git a/browser/components/Makefile.in b/browser/components/Makefile.in index feb201d23aec..11801a82bccb 100644 --- a/browser/components/Makefile.in +++ b/browser/components/Makefile.in @@ -53,6 +53,7 @@ XPIDLSRCS = \ EXTRA_PP_COMPONENTS = \ nsBrowserContentHandler.js \ nsBrowserGlue.js \ + aboutRobots.js \ $(NULL) EXTRA_JS_MODULES = distribution.js diff --git a/browser/components/aboutRobots.js b/browser/components/aboutRobots.js new file mode 100644 index 000000000000..5d75f7b37430 --- /dev/null +++ b/browser/components/aboutRobots.js @@ -0,0 +1,73 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is About:IceCream. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2008 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Ryan Flint + * Justin Dolske + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +const Cc = Components.classes; +const Ci = Components.interfaces; + +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +function AboutRobots() {} +AboutRobots.prototype = { + classDescription: "About Robots", + contractID: "@mozilla.org/network/protocol/about;1?what=robots", + classID: Components.ID("{e18da21c-a4b8-4be5-98aa-942e1e19f35c}"), + QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), + + getURIFlags: function(aURI) { + return (Ci.nsIAboutModule.ALLOW_SCRIPT | + Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT); + }, + + newChannel: function(aURI) { + var ios = Cc["@mozilla.org/network/io-service;1"]. + getService(Ci.nsIIOService); + + var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"]. + getService(Ci.nsIScriptSecurityManager); + + var channel = ios.newChannel("chrome://browser/content/aboutRobots.xhtml", + null, null); + var principal = secMan.getCodebasePrincipal(aURI); + + channel.originalURI = aURI; + channel.owner = principal; + + return channel; + } +}; + +function NSGetModule(compMgr, fileSpec) + XPCOMUtils.generateModule([AboutRobots]);