Added a CanHandleContentType to identify if a given instantiated docShell can handle the requested document type.
git-svn-id: svn://10.0.0.236/trunk@51841 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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
|
||||
//*****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user