NS_IMETHODIMP nsBaseChannel::SetNotificationCallbacks(nsIInterfaceRequestor *aCallbacks) { if (!CanSetCallbacks(aCallbacks)) { return NS_ERROR_FAILURE; } mCallbacks = aCallbacks; CallbacksChanged(); return NS_OK; }
NS_IMETHODIMP HttpBaseChannel::SetNotificationCallbacks(nsIInterfaceRequestor *aCallbacks) { if (!CanSetCallbacks(aCallbacks)) { return NS_ERROR_FAILURE; } mCallbacks = aCallbacks; mProgressSink = nullptr; mPrivateBrowsing = NS_UsePrivateBrowsing(this); return NS_OK; }
NS_IMETHODIMP HttpBaseChannel::SetNotificationCallbacks(nsIInterfaceRequestor *aCallbacks) { MOZ_ASSERT(NS_IsMainThread(), "Should only be called on the main thread."); if (!CanSetCallbacks(aCallbacks)) { return NS_ERROR_FAILURE; } mCallbacks = aCallbacks; mProgressSink = nullptr; mPrivateBrowsing = NS_UsePrivateBrowsing(this); return NS_OK; }
NS_IMETHODIMP nsWyciwygChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks) { if (!CanSetCallbacks(aNotificationCallbacks)) { return NS_ERROR_FAILURE; } mCallbacks = aNotificationCallbacks; NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup, NS_GET_IID(nsIProgressEventSink), getter_AddRefs(mProgressSink)); mPrivateBrowsing = NS_UsePrivateBrowsing(this); NS_GetAppInfo(this, &mAppId, &mInBrowser); return NS_OK; }
NS_IMETHODIMP nsWyciwygChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks) { if (!CanSetCallbacks(aNotificationCallbacks)) { return NS_ERROR_FAILURE; } mCallbacks = aNotificationCallbacks; NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup, NS_GET_IID(nsIProgressEventSink), getter_AddRefs(mProgressSink)); UpdatePrivateBrowsing(); NS_GetOriginAttributes(this, mOriginAttributes); return NS_OK; }