B2G/gecko/dom/apps/src/Webapps.jsm
// Creates a nsILoadContext object with a given appId and isBrowser flag.
Creates a nsILoadContext object with a given appId and isBrowser flag.
Creates a nsILoadContext object with a given appId and isBrowser flag .
function createLoadContext(aAppId, aIsBrowser) {
    return {
       associatedWindow: null,
       topWindow : null,
       appId: aAppId,
       isInBrowserElement: aIsBrowser,
       usePrivateBrowsing: false,
       isContent: false,
       isAppOfType: function(appType) {
         throw Cr.NS_ERROR_NOT_IMPLEMENTED;
       },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsILoadContext,
                                              Ci.nsIInterfaceRequestor,
                                              Ci.nsISupports]),
       getInterface: function(iid) {
         if (iid.equals(Ci.nsILoadContext))
           return this;
         throw Cr.NS_ERROR_NO_INTERFACE;
       }
     }
  }
function createLoadContext ( aAppId , aIsBrowser ) { return { associatedWindow : null , topWindow : null , appId : aAppId , isInBrowserElement : aIsBrowser , usePrivateBrowsing : false , isContent : false , isAppOfType : function ( appType ) { throw Cr . NS_ERROR_NOT_IMPLEMENTED ; } , QueryInterface : XPCOMUtils . generateQI ( [ Ci . nsILoadContext , Ci . nsIInterfaceRequestor , Ci . nsISupports ] ) , getInterface : function ( iid ) { if ( iid . equals ( Ci . nsILoadContext ) ) return this ; throw Cr . NS_ERROR_NO_INTERFACE ; } } }
Creates a nsILoadContext object with a given appId and isBrowser flag.
Creates a nsILoadContext object with a given appId and isBrowser flag .