31 const Cc = Components.classes;
32 const Ci = Components.interfaces;
33 const Cr = Components.results;
35 const CONTRACTID =
"@songbirdnest.com/Songbird/DndSourceTracker;1";
36 const CLASSNAME =
"Songbird Drag and Drop Source Tracker Service";
37 const CID = Components.ID(
"{54b21a93-5b1b-46a2-a60f-5378ccf7f65c}");
38 const IID =
Ci.sbIDndSourceTracker;
47 reset:
function reset() {
51 registerSource:
function registerSource(aSource) {
52 var
handle = this._nextHandle.toString();
54 this._sources[
handle] = aSource;
58 getSource:
function getSource(aHandle) {
59 if (aHandle in this._sources) {
60 return this._sources[aHandle];
62 throw Cr.NS_ERROR_NOT_AVAILABLE;
65 getSourceSupports:
function getSourceSupports(aHandle) {
66 return this.getSource(aHandle.data);
70 if (!iid.equals(
IID) &&
71 !iid.equals(
Ci.nsISupports))
72 throw Cr.NS_ERROR_NO_INTERFACE;
83 registerSelf:
function(componentManager, fileSpec, location, type) {
84 componentManager = componentManager.QueryInterface(
Ci.nsIComponentRegistrar);
86 fileSpec, location, type);
90 if (!iid.equals(
Ci.nsIFactory))
91 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
93 if (cid.equals(
CID)) {
97 throw Cr.NS_ERROR_NO_AGGREGATION;
103 throw Cr.NS_ERROR_NO_INTERFACE;
106 canUnload:
function(componentManager) {
SafebrowsingApplicationMod prototype registerSelf
function NSGetModule(comMgr, fileSpec)
sbOSDControlService prototype QueryInterface
function handle(request, response)
SafebrowsingApplicationMod prototype getClassObject
function DndSourceTracker()