[Fedora-directory-commits] esc/src/app/xul/esc/components escCLH.js, 1.1, 1.2
Jack Magne (jmagne)
fedora-directory-commits at redhat.com
Fri Feb 9 21:55:33 UTC 2007
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/components
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1893
Modified Files:
escCLH.js
Log Message:
Add support for security mode.
Index: escCLH.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/components/escCLH.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- escCLH.js 13 Sep 2006 17:52:38 -0000 1.1
+++ escCLH.js 9 Feb 2007 21:55:31 -0000 1.2
@@ -48,10 +48,36 @@
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow(null);
+ var doSecMode = false;
+ var secModeURL=null;
+
+ secModeURL = cmdLine.handleFlagWithParam("secmode",false);
+ if (secModeURL) {
+ doSecMode = true;
+ cmdLine.preventDefault = true;
+ }
+
if(win)
{
- recordMessage("Subsequent invocation. Launch an Admin page.");
- win.launchSETTINGS();
+ recordMessage("Subsequent command invocation. Launch appropriate page.");
+
+ var locName = win.location.toString();
+
+ recordMessage("Base window . " + locName);
+
+ if(doSecMode)
+ {
+
+ var uri = cmdLine.resolveURI(secModeURL);
+ recordMessage("Attempting security mode. url: " + secModeURL);
+ win.launchESCSecMode(secModeURL);
+ }
+ else
+ {
+ win.launchSETTINGS();
+ }
+
+ recordMessage("Done command line handling...");
return;
}
@@ -59,11 +85,12 @@
recordMessage(chromeURI);
-
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(nsIWindowWatcher);
- wwatch.openWindow(null, chromeURI, "_blank",
+ win = wwatch.openWindow(null, chromeURI, "_blank",
"chrome,dialog,height=-1,width=-1,popup=yes", cmdLine);
+
+
}
catch(e) {}
More information about the Fedora-directory-commits
mailing list