Added a CanHandleContentType to identify if a given instantiated docShell can handle the requested document type.

This commit is contained in:
tbogard@aol.net
1999-10-26 09:51:36 +00:00
parent 14c9f2318f
commit 107e2179f2
4 changed files with 34 additions and 0 deletions
+15
View File
@@ -21,6 +21,7 @@
*/
#include "nsHTMLDocShell.h"
#include "nsString.h"
//*****************************************************************************
//*** nsHTMLDocShell: Object Management
@@ -61,6 +62,20 @@ NS_IMPL_ISUPPORTS7(nsHTMLDocShell, nsIDocShell, nsIHTMLDocShell,
// nsHTMLDocShell::nsIDocShell Overrides
//*****************************************************************************
NS_IMETHODIMP nsHTMLDocShell::CanHandleContentType(const PRUnichar* contentType,
PRBool* canHandle)
{
NS_ENSURE_ARG_POINTER(canHandle);
nsAutoString aType(contentType);
if(aType.EqualsIgnoreCase("text/html"))
*canHandle = PR_TRUE;
else
*canHandle = PR_FALSE;
return NS_OK;
}
//*****************************************************************************
// nsHTMLDocShell::nsIHTMLDocShell
//*****************************************************************************