diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 574f08577f6..be8bbfd299e 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -182,7 +182,6 @@ public: NS_DECL_NSIWEBPAGEDESCRIPTOR NS_DECL_NSIAUTHPROMPTPROVIDER NS_DECL_NSIOBSERVER - NS_DECL_NSILOADCONTEXT NS_DECL_NSICLIPBOARDCOMMANDS NS_DECL_NSIWEBSHELLSERVICES @@ -221,6 +220,15 @@ public: // nsIScriptGlobalObjectOwner methods virtual nsIScriptGlobalObject* GetScriptGlobalObject(); + // Don't use NS_DECL_NSILOADCONTEXT because some of nsILoadContext's methods + // are shared with nsIDocShell (appID, etc.) and can't be declared twice. + NS_IMETHOD GetAssociatedWindow(nsIDOMWindow**); + NS_IMETHOD GetTopWindow(nsIDOMWindow**); + NS_IMETHOD IsAppOfType(PRUint32, bool*); + NS_IMETHOD GetIsContent(bool*); + NS_IMETHOD GetUsePrivateBrowsing(bool*); + NS_IMETHOD SetUsePrivateBrowsing(bool); + // Restores a cached presentation from history (mLSHE). // This method swaps out the content viewer and simulates loads for // subframes. It then simulates the completion of the toplevel load. diff --git a/docshell/base/nsILoadContext.idl b/docshell/base/nsILoadContext.idl index 38ad0337c96..4d0edf2aa03 100644 --- a/docshell/base/nsILoadContext.idl +++ b/docshell/base/nsILoadContext.idl @@ -66,4 +66,16 @@ interface nsILoadContext : nsISupports return usingPB; } %} + + /** + * Returns true iif the load is occurring inside a browser element. + */ + readonly attribute boolean isInBrowserElement; + + /** + * Returns the app id of the app the load is occurring is in. Returns + * nsIScriptSecurityManager::NO_APP_ID if the load is not part of an app. + */ + readonly attribute unsigned long appId; + };