From 20f9a0fcd51e5edc7ea5c66fb655cd028319100d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 15 Jun 2008 02:34:54 +0000 Subject: Add support for adding certificate exceptions. Same UI as firefox. --- (limited to 'components') diff --git a/components/.gitignore b/components/.gitignore new file mode 100644 index 0000000..19903b8 --- /dev/null +++ b/components/.gitignore @@ -0,0 +1 @@ +*.xpt diff --git a/components/Makefile.am b/components/Makefile.am new file mode 100644 index 0000000..23d2895 --- /dev/null +++ b/components/Makefile.am @@ -0,0 +1,15 @@ +xptdir = $(pkglibdir)/components +xpt_in_files = hulahopAddCertException.idl +xpt_DATA = $(xpt_in_files:.idl=.xpt) + +%.xpt: %.idl + $(LIBXUL_SDK_DIR)/bin/xpidl -m typelib -w -v -I $(LIBXUL_SDK_DIR)/idl -e $@ $< + +componentsdir = $(pkglibdir)/components +components_DATA = hulahopAddCertException.js + +EXTRA_DIST = $(xpt_in_files) + +CLEANFILES = $(xpt_DATA) + +DISTCLEANFILES = $(xpt_DATA) diff --git a/components/hulahopAddCertException.idl b/components/hulahopAddCertException.idl new file mode 100644 index 0000000..066826a --- /dev/null +++ b/components/hulahopAddCertException.idl @@ -0,0 +1,7 @@ +#include "nsISupports.idl" +#include "nsIDOMWindow.idl" + +[scriptable, uuid(4117128f-0e50-4863-b7a7-40a853451cc0)] +interface hulahopAddCertException : nsISupports { + void showDialog (in nsIDOMWindow aWindow); +}; diff --git a/components/hulahopAddCertException.js b/components/hulahopAddCertException.js new file mode 100644 index 0000000..3d1f88e --- /dev/null +++ b/components/hulahopAddCertException.js @@ -0,0 +1,21 @@ +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +function AddCertException() { }; + +AddCertException.prototype = { + classDescription: "AddCertException XPCOM Component", + classID: Components.ID("{4117128f-0e50-4863-b7a7-40a853451cc0}"), + contractID: "@sugarlabs.org/add-cert-exception;1", + QueryInterface: XPCOMUtils.generateQI([Components.interfaces.hulahopAddCertException]), + showDialog: function(window) { + var params = { location : window.location.href }; + window.openDialog('chrome://pippki/content/exceptionDialog.xul', + '', 'chrome,centerscreen,modal', params); + } +} + +var components = [AddCertException]; +function NSGetModule(compMgr, fileSpec) { + return XPCOMUtils.generateModule(components); +} + -- cgit v0.9.1