aboutsummaryrefslogtreecommitdiff
path: root/chrome/js/component.js
blob: c0ec56296dfbf49d49b37500a14248ec680178f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Ci = Components.interfaces;
Cr = Components.results;

Components.utils.import("chrome://redirector/content/js/redirector.js");

function RedirectorComponent() { }

RedirectorComponent.prototype = {
  classDescription: "Redirector",
  classID:          Components.ID("{b7a7a54f-0581-47ff-b086-d6920cb7a3f7}"),
  contractID:       "@einaregilsson.com/redirector;1",
  QueryInterface: function(iid) {
	if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIContentPolicy) || iid.equals(Ci.nsIChannelEventSink)) {
		return Redirector;
	}
	throw Cr.NS_ERROR_NO_INTERFACE;
  }
};

const NSGetFactory = XPCOMUtils.generateNSGetFactory([RedirectorComponent]);