From efb225519d73fb3156e3f09cfbf6c3ff085be512 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 2 Dec 1999 07:09:06 +0000 Subject: [PATCH] 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 --- mozilla/docshell/base/nsDSURIContentListener.cpp | 4 ++-- mozilla/docshell/base/nsDSURIContentListener.h | 2 +- mozilla/docshell/base/nsDocShell.cpp | 8 +++++--- mozilla/docshell/base/nsDocShell.h | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mozilla/docshell/base/nsDSURIContentListener.cpp b/mozilla/docshell/base/nsDSURIContentListener.cpp index 0f55c96e6b3..7b75af87c0b 100644 --- a/mozilla/docshell/base/nsDSURIContentListener.cpp +++ b/mozilla/docshell/base/nsDSURIContentListener.cpp @@ -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); diff --git a/mozilla/docshell/base/nsDSURIContentListener.h b/mozilla/docshell/base/nsDSURIContentListener.h index dccc2f60fdc..0c7f7a5ca14 100644 --- a/mozilla/docshell/base/nsDSURIContentListener.h +++ b/mozilla/docshell/base/nsDSURIContentListener.h @@ -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: diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index b8284dee34e..1bd688856b5 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -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 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); diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index 4e0ff704079..111f9da8da8 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -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,