/**WebBrowserChrome.h*/
#include "nsIURIContentListener.h"
...
class WebBrowserChrome : public nsIURIContentListener
...
public:
NS_DECL_NSIURICONTENTLISTENER
protected:
PRBool mIsURIContentListener;
/*WebBrowserChrome.cpp*/
#include "nsIURIContentListener.h"
...
(void)mWebBrowser->SetParentURIContentListener(NS_STATIC_CAST(nsIURIContentListener *, this));
...
NS_INTERFACE_MAP_BEGIN(WebBrowserChrome)
NS_INTERFACE_MAP_ENTRY(nsIURIContentListener)
NS_INTERFACE_MAP_END
...
//http://lxr.mozilla.org/seamonkey/source/uriloader/base/nsIURIContentListener.idl
//*****************************************************************************
// GeckoContainer::nsIURIContentListener
//*****************************************************************************
/* boolean onStartURIOpen (in nsIURI aURI); */
NS_IMETHODIMP WebBrowserChrome::OnStartURIOpen(nsIURI *aURI, PRBool *_retval)
{
/*nsCAutoString uriString;
aURI->GetAsciiSpec(uriString);//parse the URI to a string
printf("%s \n",uriString.get());//print out the string
fflush(stdout);//flush the output stream here*/
printf("OnStartURIOpen");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean doContent (in string aContentType, in boolean aIsContentPreferred, in nsIRequest aRequest, out nsIStreamListener aContentHandler); */
NS_IMETHODIMP WebBrowserChrome::DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval)
{
printf("DoContent");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean isPreferred (in string aContentType, out string aDesiredContentType); */
NS_IMETHODIMP WebBrowserChrome::IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval)
{
printf("IsPreferred");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean canHandleContent (in string aContentType, in boolean aIsContentPreferred, out string aDesiredContentType); */
NS_IMETHODIMP WebBrowserChrome::CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval)
{
printf("CanHandleContent");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsISupports loadCookie; */
NS_IMETHODIMP WebBrowserChrome::GetLoadCookie(nsISupports * *aLoadCookie)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP WebBrowserChrome::SetLoadCookie(nsISupports * aLoadCookie)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIURIContentListener parentContentListener; */
NS_IMETHODIMP WebBrowserChrome::GetParentContentListener(nsIURIContentListener * *aParentContentListener)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP WebBrowserChrome::SetParentContentListener(nsIURIContentListener * aParentContentListener)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
_______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
