Pass nsURILoadCommand's instead of char * around for the command associated with the url.
git-svn-id: svn://10.0.0.236/trunk@55046 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -66,7 +66,7 @@ NS_IMETHODIMP nsDSURIContentListener::DoContent(const char* aContentType, nsURIL
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aContentHandler && aAbortProcess);
|
||||
|
||||
if(HandleInCurrentDocShell(aContentType, "view", aWindowTarget,
|
||||
if(HandleInCurrentDocShell(aContentType, aCommand, aWindowTarget,
|
||||
aOpenedChannel, aContentHandler))
|
||||
{
|
||||
// In this condition content will start to be directed here.
|
||||
@@ -101,7 +101,7 @@ NS_IMETHODIMP nsDSURIContentListener::CanHandleContent(const char* aContentType,
|
||||
//*****************************************************************************
|
||||
|
||||
PRBool nsDSURIContentListener::HandleInCurrentDocShell(const char* aContentType,
|
||||
const char* aCommand, const char* aWindowTarget, nsIChannel* aOpenedChannel,
|
||||
nsURILoadCommand aCommand, const char* aWindowTarget, nsIChannel* aOpenedChannel,
|
||||
nsIStreamListener** aContentHandler)
|
||||
{
|
||||
NS_ENSURE_TRUE(mDocShell, PR_FALSE);
|
||||
|
||||
@@ -48,7 +48,7 @@ protected:
|
||||
void GetPresContext(nsIPresContext** aPresContext);
|
||||
void SetPresContext(nsIPresContext* aPresContext);
|
||||
PRBool HandleInCurrentDocShell(const char* aContentType,
|
||||
const char* aCommand, const char* aWindowTarget,
|
||||
nsURILoadCommand aCommand, const char* aWindowTarget,
|
||||
nsIChannel* aOpenedChannel, nsIStreamListener** aContentHandler);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1478,7 +1478,7 @@ void nsDocShell::SetCurrentURI(nsIURI* aUri)
|
||||
}
|
||||
|
||||
nsresult nsDocShell::CreateContentViewer(const char* aContentType,
|
||||
const char* aCommand, nsIChannel* aOpenedChannel,
|
||||
nsURILoadCommand aCommand, nsIChannel* aOpenedChannel,
|
||||
nsIStreamListener** aContentHandler)
|
||||
{
|
||||
NS_ENSURE_STATE(mCreated);
|
||||
@@ -1500,7 +1500,7 @@ nsresult nsDocShell::CreateContentViewer(const char* aContentType,
|
||||
}
|
||||
|
||||
nsresult nsDocShell::NewContentViewerObj(const char* aContentType,
|
||||
const char* aCommand, nsIChannel* aOpenedChannel,
|
||||
nsURILoadCommand aCommand, nsIChannel* aOpenedChannel,
|
||||
nsIStreamListener** aContentHandler)
|
||||
{
|
||||
//XXX This should probably be some category thing....
|
||||
@@ -1514,7 +1514,9 @@ nsresult nsDocShell::NewContentViewerObj(const char* aContentType,
|
||||
|
||||
nsCOMPtr<nsILoadGroup> loadGroup(do_QueryInterface(mLoadCookie));
|
||||
// Now create an instance of the content viewer
|
||||
NS_ENSURE_SUCCESS(docLoaderFactory->CreateInstance(aCommand, aOpenedChannel,
|
||||
// eventually content viewer is going to have to understand nsURILoadCommands...
|
||||
// until that time, pass in "view" as the string command
|
||||
NS_ENSURE_SUCCESS(docLoaderFactory->CreateInstance("view", aOpenedChannel,
|
||||
loadGroup, aContentType, NS_STATIC_CAST(nsIContentViewerContainer*, this),
|
||||
nsnull /*XXXQ Need ExtraInfo???*/,
|
||||
aContentHandler, getter_AddRefs(mContentViewer)), NS_ERROR_FAILURE);
|
||||
|
||||
@@ -107,9 +107,9 @@ protected:
|
||||
nsresult EnsureScriptEnvironment();
|
||||
|
||||
void SetCurrentURI(nsIURI* aUri);
|
||||
nsresult CreateContentViewer(const char* aContentType, const char* aCommand,
|
||||
nsresult CreateContentViewer(const char* aContentType, nsURILoadCommand aCommand,
|
||||
nsIChannel* aOpenedChannel, nsIStreamListener** aContentHandler);
|
||||
nsresult NewContentViewerObj(const char* aContentType, const char* aCommand,
|
||||
nsresult NewContentViewerObj(const char* aContentType, nsURILoadCommand aCommand,
|
||||
nsIChannel* aOpenedChannel, nsIStreamListener** aContentHandler);
|
||||
|
||||
NS_IMETHOD FireStartDocumentLoad(nsIDocumentLoader* aLoader,
|
||||
|
||||
Reference in New Issue
Block a user