mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
Bug #67598 --> we no longer need to invoke the ucth dialog here.
sr=sspitzer
This commit is contained in:
parent
4db17fe50b
commit
2019b92f07
@ -106,8 +106,6 @@ protected:
|
|||||||
// and it will return TRUE.
|
// and it will return TRUE.
|
||||||
PRBool ProcessCanceledCase(nsIChannel * aChannel);
|
PRBool ProcessCanceledCase(nsIChannel * aChannel);
|
||||||
|
|
||||||
nsresult InvokeUnknownContentHandler(nsIChannel * aChannel, const char * aContentType, nsIDOMWindowInternal * aDomWindow);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsCOMPtr<nsIURIContentListener> m_contentListener;
|
nsCOMPtr<nsIURIContentListener> m_contentListener;
|
||||||
nsCOMPtr<nsIStreamListener> m_targetStreamListener;
|
nsCOMPtr<nsIStreamListener> m_targetStreamListener;
|
||||||
@ -371,8 +369,7 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIChannel * aChannel, nsISupports
|
|||||||
// the listener is doing all the work from here...we are done!!!
|
// the listener is doing all the work from here...we are done!!!
|
||||||
if (bAbortProcess) return rv;
|
if (bAbortProcess) return rv;
|
||||||
|
|
||||||
// BEFORE we fail and bring up the unknown content handler dialog...
|
// try to detect if there is a helper application we an use...
|
||||||
// try to detect if there is a helper application we an use instead...
|
|
||||||
if (/* mCommand == nsIURILoader::viewUserClick && */ !contentStreamListener)
|
if (/* mCommand == nsIURILoader::viewUserClick && */ !contentStreamListener)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIURI> uri;
|
nsCOMPtr<nsIURI> uri;
|
||||||
@ -389,12 +386,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIChannel * aChannel, nsISupports
|
|||||||
rv = NS_ERROR_FAILURE; // this will cause us to bring up the unknown content handler dialog.
|
rv = NS_ERROR_FAILURE; // this will cause us to bring up the unknown content handler dialog.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIDOMWindowInternal> domWindow (do_GetInterface(originalWindowContext));
|
|
||||||
return InvokeUnknownContentHandler(aChannel, contentType, domWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
// okay, all registered listeners have had a chance to handle this content...
|
// okay, all registered listeners have had a chance to handle this content...
|
||||||
// did one of them give us a stream listener back? if so, let's start reading data
|
// did one of them give us a stream listener back? if so, let's start reading data
|
||||||
// into it...
|
// into it...
|
||||||
@ -405,17 +396,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIChannel * aChannel, nsISupports
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsDocumentOpenInfo::InvokeUnknownContentHandler(nsIChannel * aChannel, const char * aContentType, nsIDOMWindowInternal * aDomWindow)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG(aChannel);
|
|
||||||
NS_ENSURE_ARG(aDomWindow);
|
|
||||||
|
|
||||||
nsCOMPtr<nsIUnknownContentTypeHandler> handler (do_GetService(NS_IUNKNOWNCONTENTTYPEHANDLER_CONTRACTID));
|
|
||||||
NS_ENSURE_TRUE(handler, NS_ERROR_FAILURE);
|
|
||||||
|
|
||||||
return handler->HandleUnknownContentType( aChannel, aContentType, aDomWindow );
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult nsDocumentOpenInfo::RetargetOutput(nsIChannel * aChannel, const char * aSrcContentType, const char * aOutContentType,
|
nsresult nsDocumentOpenInfo::RetargetOutput(nsIChannel * aChannel, const char * aSrcContentType, const char * aOutContentType,
|
||||||
nsIStreamListener * aStreamListener)
|
nsIStreamListener * aStreamListener)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user