Bug 832700 - Add private browsing to b2g, API implementation r=ehsan,smaug
This commit is contained in:
@@ -851,6 +851,7 @@ nsDocShell::nsDocShell():
|
||||
#endif
|
||||
mAffectPrivateSessionLifetime(true),
|
||||
mInvisible(false),
|
||||
mHasLoadedNonBlankURI(false),
|
||||
mDefaultLoadFlags(nsIRequest::LOAD_NORMAL),
|
||||
mFrameType(eFrameTypeRegular),
|
||||
mOwnOrContainingAppId(nsIScriptSecurityManager::UNKNOWN_APP_ID),
|
||||
@@ -1928,6 +1929,10 @@ nsDocShell::SetCurrentURI(nsIURI *aURI, nsIRequest *aRequest,
|
||||
|
||||
mCurrentURI = NS_TryToMakeImmutable(aURI);
|
||||
|
||||
if (!NS_IsAboutBlank(mCurrentURI)) {
|
||||
mHasLoadedNonBlankURI = true;
|
||||
}
|
||||
|
||||
bool isRoot = false; // Is this the root docshell
|
||||
bool isSubFrame = false; // Is this a subframe navigation?
|
||||
|
||||
@@ -2277,6 +2282,15 @@ nsDocShell::SetPrivateBrowsing(bool aUsePrivateBrowsing)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasLoadedNonBlankURI(bool* aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
*aResult = mHasLoadedNonBlankURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetUseRemoteTabs(bool* aUseRemoteTabs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user