38 #include "nsServiceManagerUtils.h"
40 #include "nsIJSContextStack.h"
49 nsCOMPtr<nsIJSContextStack> mJSStack;
58 mPBService = do_GetService(
"@mozilla.org/privatebrowsing;1", &rv);
66 mJSStack = do_GetService(
"@mozilla.org/js/xpc/ContextStack;1", &rv);
68 if (NS_SUCCEEDED(rv) && mJSStack) {
69 rv = mJSStack->Push(nsnull);
80 NS_ASSERTION(cx == nsnull,
"JSContextStack mismatch");
85 nsPrivateBrowsingServiceWrapper::GetPrivateBrowsingEnabled(PRBool *aPrivateBrowsingEnabled)
87 if (!aPrivateBrowsingEnabled)
88 return NS_ERROR_NULL_POINTER;
90 return mPBService->GetPrivateBrowsingEnabled(aPrivateBrowsingEnabled);
94 nsPrivateBrowsingServiceWrapper::SetPrivateBrowsingEnabled(PRBool aPrivateBrowsingEnabled)
97 return mPBService->SetPrivateBrowsingEnabled(aPrivateBrowsingEnabled);
101 nsPrivateBrowsingServiceWrapper::GetAutoStarted(PRBool *aAutoStarted)
104 return NS_ERROR_NULL_POINTER;
106 return mPBService->GetAutoStarted(aAutoStarted);
110 nsPrivateBrowsingServiceWrapper::RemoveDataFromDomain(
const nsACString & aDomain)
113 return mPBService->RemoveDataFromDomain(aDomain);
117 nsPrivateBrowsingServiceWrapper::Observe(
nsISupports *aSubject,
const char *aTopic,
const PRUnichar *
aData)
120 nsCOMPtr<nsIObserver>
observer(do_QueryInterface(mPBService));
121 NS_ENSURE_TRUE(
observer, NS_ERROR_FAILURE);
122 return observer->Observe(aSubject, aTopic, aData);
NS_IMPL_ISUPPORTS2(sbAlbumArtService, sbIAlbumArtService, nsIObserver) NS_IMETHODIMP sbAlbumArtService
_updateTextAndScrollDataForFrame aData