Bug 775860 - copy appId and isInBrowserElement from nsIDocShell to nsILoadContext. r=jlebar, sr=sicking

This commit is contained in:
Jason Duell 2012-07-20 11:38:43 -07:00
parent d5e3dd1f70
commit f688e8acca
2 changed files with 21 additions and 1 deletions

View File

@ -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.

View File

@ -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;
};