Bug 1107516 - Part 1: Add LoadContext constructor taking an nsIPrincipal. r=smaug
This commit is contained in:
@@ -4,12 +4,28 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/LoadContext.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
NS_IMPL_ISUPPORTS(LoadContext, nsILoadContext, nsIInterfaceRequestor)
|
||||
|
||||
LoadContext::LoadContext(nsIPrincipal* aPrincipal)
|
||||
: mTopFrameElement(nullptr)
|
||||
, mNestedFrameId(0)
|
||||
, mIsContent(true)
|
||||
, mUsePrivateBrowsing(false)
|
||||
, mUseRemoteTabs(false)
|
||||
#ifdef DEBUG
|
||||
, mIsNotNull(true)
|
||||
#endif
|
||||
{
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(aPrincipal->GetAppId(&mAppId)));
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(
|
||||
aPrincipal->GetIsInBrowserElement(&mIsInBrowserElement)));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LoadContext::nsILoadContext
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user