diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index e38aa243ab50..d5d16fc077f7 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -80,7 +80,6 @@ #include "mozilla/unused.h" #include "mozilla/dom/Element.h" #include "mozilla/layout/RenderFrameParent.h" -#include "nsIAppsService.h" #include "jsapi.h" @@ -1477,24 +1476,6 @@ nsFrameLoader::MaybeCreateDocShell() mDocShell = do_CreateInstance("@mozilla.org/docshell;1"); NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE); - if (OwnerIsBrowserFrame() && - mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozapp)) { - nsCOMPtr appsService = - do_GetService(APPS_SERVICE_CONTRACTID); - if (!appsService) { - NS_ERROR("Apps Service is not available!"); - return NS_ERROR_FAILURE; - } - - nsAutoString manifest; - mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::mozapp, manifest); - - PRUint32 appId; - appsService->GetAppLocalIdByManifestURL(manifest, &appId); - - mDocShell->SetAppId(appId); - } - if (!mNetworkCreated) { nsCOMPtr history = do_QueryInterface(mDocShell); if (history) { diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index d31fa7877ce4..93610829e043 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -763,7 +763,6 @@ nsDocShell::nsDocShell(): #ifdef DEBUG mInEnsureScriptEnv(false), #endif - mAppId(nsIScriptSecurityManager::NO_APP_ID), mParentCharsetSource(0) { mHistoryID = ++gDocshellIDCounter; @@ -12065,10 +12064,6 @@ nsDocShell::GetInheritedFrameType() nsDocShell::FrameType nsDocShell::GetFrameType() { - if (mAppId != nsIScriptSecurityManager::NO_APP_ID) { - return eFrameTypeApp; - } - return mIsBrowserFrame ? eFrameTypeBrowser : eFrameTypeRegular; } @@ -12132,37 +12127,3 @@ nsDocShell::GetIsBelowContentBoundary(bool* aIsInContentBoundary) return NS_OK; } - -NS_IMETHODIMP -nsDocShell::SetAppId(PRUint32 aAppId) -{ - MOZ_ASSERT(mAppId == nsIScriptSecurityManager::NO_APP_ID); - MOZ_ASSERT(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID); - - mAppId = aAppId; - return NS_OK; -} - -NS_IMETHODIMP -nsDocShell::GetAppId(PRUint32* aAppId) -{ - if (mAppId != nsIScriptSecurityManager::NO_APP_ID) { - MOZ_ASSERT(GetFrameType() == eFrameTypeApp); - - *aAppId = mAppId; - return NS_OK; - } - - MOZ_ASSERT(GetFrameType() != eFrameTypeApp); - - nsCOMPtr parentAsItem; - GetSameTypeParent(getter_AddRefs(parentAsItem)); - - nsCOMPtr parent = do_QueryInterface(parentAsItem); - if (!parent) { - *aAppId = nsIScriptSecurityManager::NO_APP_ID; - return NS_OK; - } - - return parent->GetAppId(aAppId); -} diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 574f08577f6e..2c9136d5da24 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -824,8 +824,6 @@ protected: nsRefPtr mTiming; - PRUint32 mAppId; - private: nsCOMPtr mForcedCharset; nsCOMPtr mParentCharset; diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 33f5a08ff407..1587d97b38c5 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -39,7 +39,7 @@ interface nsIWebBrowserPrint; interface nsIVariant; interface nsIPrivacyTransitionObserver; -[scriptable, builtinclass, uuid(c98f0f21-fe96-4f06-9978-0a9422a789fa)] +[scriptable, builtinclass, uuid(57889367-590b-4ea2-a345-5211253babf5)] interface nsIDocShell : nsISupports { /** @@ -630,23 +630,4 @@ interface nsIDocShell : nsISupports * in his parent hierarchy. */ readonly attribute boolean isBelowContentBoundary; - - /** - * Set the app id this docshell is associated with. The id has to be a valid - * app id. If the docshell isn't associated with any app, the value should be - * nsIScriptSecurityManager::NO_APP_ID. However, this is the default value if - * nothing is et. - * - * This method is [noscript] to reduce the scope. It should be used at very - * specific moments. - * - * Calling setAppId() will mark the frame as an app frame. - */ - [noscript] void setAppId(in unsigned long appId); - - /** - * Returns the app id of the app the docshell is in. Returns - * nsIScriptSecurityManager::NO_APP_ID if the docshell is not in an app. - */ - readonly attribute unsigned long appId; };