Bug 832700 - Add private browsing to b2g, API implementation r=ehsan,smaug

This commit is contained in:
Fabrice Desré
2014-10-10 14:28:04 -07:00
parent 269944532a
commit 8de17fbf96
7 changed files with 41 additions and 2 deletions

View File

@@ -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)
{