Commit fb0e37d3 authored by Thiago H. S. Picharski's avatar Thiago H. S. Picharski

Merge remote branch 'le-browser/master'

Signed-off-by: 's avatarThiago H. S. Picharski <thsp08@c3sl.ufpr.br>
parents ee9cdc78 8752513b
#!/bin/bash
# gerar.sh
# Copyright (c) 2006 by Bruno Ribas <ribas@ufpr.br>
DIRTMP=$(mktemp -d)
VERSAO=$(cat VERSAO)
#arrumar versao
#$1 tipo de incremento
MAJOR=$(echo $VERSAO| cut -d'.' -f1)
MINOR=$(echo $VERSAO| cut -d'.' -f2)
REVISION=$(echo $VERSAO| cut -d'.' -f3)
case $1 in
Minor)
((MINOR++))
REVISION=0
;;
Major)
((MAJOR++))
MINOR=0
REVISION=0
;;
help)
echo "Uso: $0 Major|Minor|Revision"
echo ' Major - Altera versao Major'
echo ' Minor - Altera versao Minor'
exit
;;
*)
((REVISION++))
;;
esac
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
#Compila a documentacao do pacote no diretorio doc/
#cd doc/
#hevea -text *.tex
#hevea -text *.tex
#cd ../
cp -r pacote $DIRTMP
#Copia a documentacao compilada para dentro do pacote.
#cp doc/*.txt $DIRTMP/pacote/usr/share/doc/prd-*
cd $DIRTMP
find . -name ".git" -exec rm -rf {} \; &>/dev/null
sed -i -e "s/Version:/Version: $VERSAO/" pacote/DEBIAN/control
fakeroot dpkg -b pacote .
cd -
cp $DIRTMP/*deb .
rm -rf $DIRTMP
# vim:tabstop=4:shiftwidth=4:encoding=iso-8859-1
Package: le-browser
Priority: important
Section: main
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Architecture: i386
Version:
Pre-Depends: firefox
Depends: ubufox, flashplugin-installer, icedtea6-plugin, totem-mozilla
Description: PT-BR Ubuntu Firefox web browser with Flash, Java, Moonlight
and DownloadHelper plugins, for the LE project
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-browser
#
# le-browser is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
FFRDFFILE="/etc/firefox/profile/mimeTypes.rdf"
FFPREFSFILE="/etc/firefox/profile/prefs.js"
# Restore /etc/firefox/profile/mimeTypes.rdf and
# /etc/firefox/profile/prefs.js
if [[ "$1" != "upgrade" ]]; then
rm -f ${FFRDFFILE}
dpkg-divert --package le-browser --remove --rename \
--divert ${FFRDFFILE}{.real,}
rm -f ${FFPREFSFILE}
dpkg-divert --package le-browser --remove --rename \
--divert ${FFPREFSFILE}{.real,}
fi
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-browser
#
# le-browser is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
FFRDFFILE="/etc/firefox/profile/mimeTypes.rdf"
FFPREFSFILE="/etc/firefox/profile/prefs.js"
# Diversion of /etc/firefox/profile/mimeTypes.rdf
dpkg-divert --package le-browser --add --rename \
--divert ${FFRDFFILE}{.real,}
# Diversion of /etc/firefox/profile/prefs.js
dpkg-divert --package le-browser --add --rename \
--divert ${FFPREFSFILE}{.real,}
/* Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
* Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
*
* This file is part of le-browser
*
* le-browser is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*/
/* LE browser specific configuration */
/* DownloadHelper options */
user_pref("dwhelper.do-welcome",false);
user_pref("dwhelper.safe-mode", true);
override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
locale autoconfig pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/autoconfig/
locale alerts pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/alerts/
locale browser-region pt-BR jar:chrome/pt-BR.jar!/locale/browser-region/
override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
locale cookie pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/cookie/
override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
locale places pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/places/
locale global pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/global/
locale pippki pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/pippki/
locale mozapps pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/mozapps/
locale passwordmgr pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/passwordmgr/
locale global-region pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/global-region/
locale reporter pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/reporter/
locale branding pt-BR jar:chrome/pt-BR.jar!/locale/branding/
locale global-platform pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/global-platform/
locale pipnss pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/pipnss/
locale browser pt-BR jar:chrome/pt-BR.jar!/locale/browser/
locale necko pt-BR jar:chrome/pt-BR.jar!/locale/pt-BR/necko/
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest"
em:id="langpack-pt-BR@firefox.mozilla.org"
em:name="Interface brasileira do Firefox"
em:description="Menus e janelas do Firefox em português brasileiro (pt-BR)."
em:homepageURL="http://br.mozdev.org/firefox/idiomas"
em:version="3.6.226"
em:type="8"
em:creator="http://br.mozdev.org">
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.6</em:minVersion>
<em:maxVersion>3.6.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
Manifest-Version: 1.0
Created-By: Signtool (signtool 3.11.4 Basic ECC)
Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
Install-Script: install.js
Name: chrome.manifest
Digest-Algorithms: MD5 SHA1
MD5-Digest: f4XkjciRyUuWS85BIozEIg==
SHA1-Digest: vZvY7Uy/9idvbSlCYitMu1xtrvY=
Name: components/moonlight.js
Digest-Algorithms: MD5 SHA1
MD5-Digest: J+lsvKoavTQo0rh3qPulLw==
SHA1-Digest: 9JIoj6n74G7rbQURXeal/QuJdR0=
Name: content/application.js
Digest-Algorithms: MD5 SHA1
MD5-Digest: 51TM/8ltJxbTVp3nBMTSng==
SHA1-Digest: UZGJjgMNsvon6WBDzZEZhqvJbzE=
Name: content/moonlight.xul
Digest-Algorithms: MD5 SHA1
MD5-Digest: e89yMqEuKl03BM3BH9jPHw==
SHA1-Digest: xGXXvHheqqU+CKDknFCKQJywFmw=
Name: install.rdf
Digest-Algorithms: MD5 SHA1
MD5-Digest: P/8ILsGe8MXFoWPYme0dTQ==
SHA1-Digest: C4BzY1Cq8EVGixojOXS1yt3Ei5U=
Name: locale/en-US/moonlight.dtd
Digest-Algorithms: MD5 SHA1
MD5-Digest: 1B2M2Y8AsgTpgAmY7PhCfg==
SHA1-Digest: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
Name: plugins/libmoonloaderxpi.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: CEZ/zx3n8700Uj2nhhZB5g==
SHA1-Digest: EaO9/C5wgi/Wi45nB8DKrCmQQ6c=
Name: plugins/moonlight/libmoonplugin-ff3bridge.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: ITGKEUZusJ2b3LI09QvVMA==
SHA1-Digest: OtzWcJuTEt9yKe586PasHg3dlp8=
Name: plugins/moonlight/libmoonpluginxpi.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: /Lx/06ItGENk4dbm0SrzLQ==
SHA1-Digest: EKcmO3U3cTVoJ509nBlY49XRboY=
Name: plugins/moonlight/lunar-launcher
Digest-Algorithms: MD5 SHA1
MD5-Digest: tmsRHHwDLQ5rQFPX998Vpg==
SHA1-Digest: 8yOCwV2m2FjY6Fe6+5OJLMM1QSs=
Name: plugins/moonlight/Microsoft.VisualBasic.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 9gWmAqJYtRo0qzt4Qy7eHQ==
SHA1-Digest: 4Ufjb9mB767oH1mVuY3gEMHNNPc=
Name: plugins/moonlight/mscorlib.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: y5WzpuVIQJhLwajMXKUHKQ==
SHA1-Digest: XeK5CpRTQHiV25iFF8Uvs90IIHo=
Name: plugins/moonlight/System.Core.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: VR4HH/MjoZEVhEsETc/UHg==
SHA1-Digest: ypQ/0j++YXtuPwgDbfOxjq9txb8=
Name: plugins/moonlight/System.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: shkNKPXkPxKvlVKy5dBGRA==
SHA1-Digest: sJ/Xxp0Ktgb3wogpoy4EN+f3/FM=
Name: plugins/moonlight/System.Net.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 5mPcHHbmhcu2Po+NzZVY2Q==
SHA1-Digest: oqOUHzhEeFgo5vk9UECJ9YHs9uw=
Name: plugins/moonlight/System.Runtime.Serialization.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: j8qvXhVd+DcOiAOAmmFl0w==
SHA1-Digest: hpqDL5E/vxJL1J6LZmgPgLTHSso=
Name: plugins/moonlight/System.ServiceModel.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: aA9nZy2Ju/srVe7+09cOLA==
SHA1-Digest: 5pesINAfIP18xSf28Vedyn/Xb9g=
Name: plugins/moonlight/System.ServiceModel.Web.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: BNQncEgx4g4TmXDxTeWuiw==
SHA1-Digest: aTHXD20U7VDWxyBgxF/IkzaffLw=
Name: plugins/moonlight/System.Windows.Browser.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: MdWYnLou+Q4MBtfSF1igHw==
SHA1-Digest: MfcSWCmHjt6ddZsx/epipJHJOsU=
Name: plugins/moonlight/System.Windows.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: NhyJNFs+O3/vkAhHkhW44A==
SHA1-Digest: jeEdND3VtXVmzGc7YQ24U3dGn0k=
Name: plugins/moonlight/System.Xml.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: P/ZT9hJP5hZKj/47p2l7Ug==
SHA1-Digest: p/f41qDPQLV/dQ4Ev9+xvyKR3CE=
Name: skin/icon32.png
Digest-Algorithms: MD5 SHA1
MD5-Digest: USJUxcvjRP1wL43M/J4y8A==
SHA1-Digest: 0qiPvUyH4SOfZYyDDKdC2aFgMhI=
Signature-Version: 1.0
Created-By: Signtool (signtool 3.11.4 Basic ECC)
Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
Digest-Algorithms: MD5 SHA1
MD5-Digest: kPNhglg9CTgV1g581zSITA==
SHA1-Digest: AAWfjLwW/QW2fNQk3DOTvjyFANc=
Name: chrome.manifest
Digest-Algorithms: MD5 SHA1
MD5-Digest: JeLdAtFldTUeTliAQaeDyw==
SHA1-Digest: CVgSuOQkPTLpBMfHt/aUZg/28SI=
Name: components/moonlight.js
Digest-Algorithms: MD5 SHA1
MD5-Digest: 5WI72KNNc9m09Ak7/RXauQ==
SHA1-Digest: 4nM9mYwx+RofhD3KLff1M49VhWk=
Name: content/application.js
Digest-Algorithms: MD5 SHA1
MD5-Digest: BTjTxOPm99NEP4K1v9i3vQ==
SHA1-Digest: 5/ordNtE4UaeR2HBfY7oYolNFiA=
Name: content/moonlight.xul
Digest-Algorithms: MD5 SHA1
MD5-Digest: S2cZLnDfUCjK3zWKb2otog==
SHA1-Digest: 2HmI4eUMk/vMITXtr8VWotEfSJs=
Name: install.rdf
Digest-Algorithms: MD5 SHA1
MD5-Digest: H3g0CLj3nlf1oI/3zjX4mg==
SHA1-Digest: pnPik7QYitoBwP71lGb2Wm5dIXo=
Name: locale/en-US/moonlight.dtd
Digest-Algorithms: MD5 SHA1
MD5-Digest: gbIS82kYgRsTFUoUor2lFQ==
SHA1-Digest: BmXclh7xQjcqs0L8e2LS0sznii4=
Name: plugins/libmoonloaderxpi.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: bDYFPkbrmJZDHWNNe//J6Q==
SHA1-Digest: u+yKUoFGxq2SgQ2+Bpm4+vit2+s=
Name: plugins/moonlight/libmoonplugin-ff3bridge.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: QjoAY+41arDUShiGlFgX0Q==
SHA1-Digest: 7XxshFQeMc5qcpZs8IZ9yrAQn8w=
Name: plugins/moonlight/libmoonpluginxpi.so
Digest-Algorithms: MD5 SHA1
MD5-Digest: 5XbarotIpuNJdnVHdXv27A==
SHA1-Digest: 1/vA+5M5rp4tY08Hj6gLMuqzzBo=
Name: plugins/moonlight/lunar-launcher
Digest-Algorithms: MD5 SHA1
MD5-Digest: NMwDArdSlOFEd+UPZAOZyw==
SHA1-Digest: Ytpe79WXKzicNLgHec1u3rOI03c=
Name: plugins/moonlight/Microsoft.VisualBasic.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 9QSRU3GyzXnbuDbu9c28KQ==
SHA1-Digest: TRyuKp+N7RqPoxaiXq6do0QUXfU=
Name: plugins/moonlight/mscorlib.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 8/5CouKC5Sa4FRzNdqH29A==
SHA1-Digest: 0O08BeiJ4McVyt2daXFrcS3jOX8=
Name: plugins/moonlight/System.Core.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: fXqIswMDuIlhtCdZgiI5cg==
SHA1-Digest: rudmchKMWE5iP8CHFoT8FbR8m3s=
Name: plugins/moonlight/System.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: nepQFMK4nnhDybAN8UhUdw==
SHA1-Digest: TPsmRIuqOweP2rWNbAkGzEZPaK8=
Name: plugins/moonlight/System.Net.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 5X6/wdFrW2Rqk6pKWFNDcA==
SHA1-Digest: DHF8Y7FBdQ54gzxvhtiBQIn+7jI=
Name: plugins/moonlight/System.Runtime.Serialization.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 0LCKVBsHJ+zTTZ4F40Jtxw==
SHA1-Digest: vcb1GzqWLru/uIOyTK5hQt55dLs=
Name: plugins/moonlight/System.ServiceModel.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: 9v4IhxbI+GJ7xeh0JCM5Tg==
SHA1-Digest: uDd481VgwkA2GqNS8xlHK6+zcuA=
Name: plugins/moonlight/System.ServiceModel.Web.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: AMVxNf2Y1SFI7tdJLrwTrg==
SHA1-Digest: ORy6eYIRlh+HkxdELMprAXg4scw=
Name: plugins/moonlight/System.Windows.Browser.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: FtVRk+6z626NUr+IDeZz7A==
SHA1-Digest: cz0hvzgxpa53/jFfqaOajfFa+Z8=
Name: plugins/moonlight/System.Windows.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: rmldpFh47uAhbCAQhLp9Iw==
SHA1-Digest: k8Qek2RA7jDI//dmgcg3yqS1MVE=
Name: plugins/moonlight/System.Xml.dll
Digest-Algorithms: MD5 SHA1
MD5-Digest: ftqpTm/eFK1HYjyfcDSZ5A==
SHA1-Digest: KJPWPArzMmySwQe6+GXOTgPbNZ8=
Name: skin/icon32.png
Digest-Algorithms: MD5 SHA1
MD5-Digest: CIvokw2UQwaBqefoR5S/wg==
SHA1-Digest: 8lf1n8Z6gtQbOrLzh4a1mAjArHE=
content moonlight content/
skin moonlight default skin/
locale moonlight en-US locale/en-US/
const nsISupports = Components.interfaces.nsISupports;
const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
const nsICommandLine = Components.interfaces.nsICommandLine;
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
const nsIFactory = Components.interfaces.nsIFactory;
const nsIModule = Components.interfaces.nsIModule;
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
const nsIConsoleService = Components.interfaces.nsIConsoleService;
const nsIMutableArray = Components.interfaces.nsIMutableArray;
const nsIWritableVariant = Components.interfaces.nsIWritableVariant;
// the chrome URI of our extension
const CHROME_URI = "chrome://moonlight/content/";
// the contract id, CID, and category
const clh_contractID = "@mozilla.org/commandlinehandler/general-startup;1?type=moonlight";
// use uuidgen to generate a unique ID
const clh_CID = Components.ID("{f066e3d7-71e0-44eb-8e41-a445b0753125}");
// category names are sorted alphabetically. Typical command-line handlers use a
// category that begins with the letter "m".
const clh_category = "m-moonlight";
/**
* Utility functions
*/
function myDump(aMessage) {
var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
.getService(nsIConsoleService);
consoleService.logStringMessage("Moonlight: " + aMessage);
}
/**
* Opens a chrome window.
* @param aChromeURISpec a string specifying the URI of the window to open.
* @param aArgument an argument to pass to the window (may be null)
*/
function openWindow(aChromeURISpec)
{
var array = Components.classes["@mozilla.org/array;1"]
.createInstance(nsIMutableArray);
for (var i=1; i<arguments.length; i++)
{
myDump ("arguments[" + i + "] = " + arguments[i]);
var variant = Components.classes["@mozilla.org/variant;1"]
.createInstance(nsIWritableVariant);
variant.setFromVariant(arguments[i]);
array.appendElement(variant, false);
}
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(nsIWindowWatcher);
ww.openWindow(null, aChromeURISpec, "_blank",
"chrome,resizable,dialog=no",
array);
}
/**
* The XPCOM component that implements nsICommandLineHandler.
* It also implements nsIFactory to serve as its own singleton factory.
*/
const moonlightHandler = {
/* nsISupports */
QueryInterface : function clh_QI(iid)
{
if (iid.equals(nsICommandLineHandler) ||
iid.equals(nsIFactory) ||
iid.equals(nsISupports))
return this;
throw Components.results.NS_ERROR_NO_INTERFACE;
},
/* nsICommandLineHandler */
handle : function clh_handle(cmdLine)
{
try {
// command line flag that takes an argument
var uristr = cmdLine.handleFlagWithParam("moonapp", false);
var width = cmdLine.handleFlagWithParam("moonwidth", false);
var height = cmdLine.handleFlagWithParam("moonheight", false);
var title = cmdLine.handleFlagWithParam("moontitle", false);
// only open a window if they supply an app for us to load.
if (!uristr)
return;
myDump ("opening uri " + uristr + ", width = " + width + ", height = " + height);
// convert uristr to an nsIURI
var uri = cmdLine.resolveURI(uristr);
width = parseInt (width);
if (isNaN (width)) width = 500;
height = parseInt (height);
if (isNaN (height)) height = 500;
if (!title)
title = "Moonlight Out of Browser Application";
openWindow(CHROME_URI, uri, title, width, height);
cmdLine.preventDefault = true;
}
catch (e) {
Components.utils.reportError("incorrect parameter passed to -moonapp on the command line.");
Components.utils.reportError(e);
}
},
// CHANGEME: change the help info as appropriate, but
// follow the guidelines in nsICommandLineHandler.idl
// specifically, flag descriptions should start at
// character 24, and lines should be wrapped at
// 72 characters with embedded newlines,
// and finally, the string should end with a newline
helpInfo : " -moonapp <uri> Open the specified Silverlight application\n" +
" in Out-of-Browser mode.\n" +
" -moonwidth <int> Specifies the width of the Out-of-Browser window.\n" +
" -moonheight <int> Specifies the height of the Out-of-Browser window.\n" +
" -moontitle <str> Specifies the window title of the Out-of-Browser window.\n",
/* nsIFactory */
createInstance : function clh_CI(outer, iid)
{
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
return this.QueryInterface(iid);
},
lockFactory : function clh_lock(lock)
{
/* no-op */
}
};
/**
* The XPCOM glue that implements nsIModule
*/
const moonlightHandlerModule = {
/* nsISupports */
QueryInterface : function mod_QI(iid)
{
if (iid.equals(nsIModule) ||
iid.equals(nsISupports))
return this;
throw Components.results.NS_ERROR_NO_INTERFACE;
},
/* nsIModule */
getClassObject : function mod_gch(compMgr, cid, iid)
{
if (cid.equals(clh_CID))
return moonlightHandler.QueryInterface(iid);
throw Components.results.NS_ERROR_NOT_REGISTERED;
},
registerSelf : function mod_regself(compMgr, fileSpec, location, type)
{
compMgr.QueryInterface(nsIComponentRegistrar);
compMgr.registerFactoryLocation(clh_CID,
"moonlightHandler",
clh_contractID,
fileSpec,
location,
type);
var catMan = Components.classes["@mozilla.org/categorymanager;1"].
getService(nsICategoryManager);
catMan.addCategoryEntry("command-line-handler",
clh_category,
clh_contractID, true, true);
},
unregisterSelf : function mod_unreg(compMgr, location, type)
{
compMgr.QueryInterface(nsIComponentRegistrar);
compMgr.unregisterFactoryLocation(clh_CID, location);
var catMan = Components.classes["@mozilla.org/categorymanager;1"].
getService(nsICategoryManager);
catMan.deleteCategoryEntry("command-line-handler", clh_category);
},
canUnload : function (compMgr)
{
return true;
}
};