Examples of nsIComponentRegistrar


Examples of org.mozilla.interfaces.nsIComponentRegistrar

    // We can only access XPCOM when it is properly initialized.
    // This happens when the web browser is created so we run our code in sequence.
    webBrowser.runInSequence(new Runnable() {
      public void run() {
        try {
          nsIComponentRegistrar registrar = MozillaXPCOM.Mozilla.getComponentRegistrar();
          String NS_DOWNLOAD_CID = "e3fa9D0a-1dd1-11b2-bdef-8c720b597445";
          String NS_TRANSFER_CONTRACTID = "@mozilla.org/transfer;1";
          registrar.registerFactory(NS_DOWNLOAD_CID, "Transfer", NS_TRANSFER_CONTRACTID, new nsIFactory() {
            public nsISupports queryInterface(String uuid) {
              if(uuid.equals(nsIFactory.NS_IFACTORY_IID) || uuid.equals(nsIFactory.NS_ISUPPORTS_IID)) {
                return this;
              }
              return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.