add private interface for opening a url with post data

removed content listener and progress sink interfaces from
OpenURI and friends. Instead, pass in a nsISupports window
context. We can use the requestor interface to ask the
window context for the content listener and progress sink.
This reduced the number of arguments to OpenURI by one.
And eventually we'll query the window context for a
docshell / webshell interface which we could pass around.
r=travis
This commit is contained in:
mscott%netscape.com 1999-11-29 21:00:14 +00:00
Родитель 008b735acb
Коммит 7beb523ec1
1 изменённых файлов: 39 добавлений и 7 удалений

Просмотреть файл

@ -47,6 +47,7 @@ interface nsIURI;
interface nsIProgressEventSink; interface nsIProgressEventSink;
interface nsIChannel; interface nsIChannel;
interface nsIStreamListener; interface nsIStreamListener;
interface nsIInputStream;
[scriptable, uuid(40AECB53-8B65-11d3-989D-001083010E9B)] [scriptable, uuid(40AECB53-8B65-11d3-989D-001083010E9B)]
interface nsIURILoader : nsISupports interface nsIURILoader : nsISupports
@ -64,9 +65,12 @@ interface nsIURILoader : nsISupports
/* OpenURI requires the following parameters..... /* OpenURI requires the following parameters.....
aURI --> the uri you wish to open aURI --> the uri you wish to open
aWindowTarget -> the name of the desired target window (can be null) aWindowTarget -> the name of the desired target window (can be null)
aProgressEventSink -> a progress event sink associated with the url (can be null) aWindowContext --> if you are running the url from a doc shell or a web shell,
aContentListener --> a content listener you want to give first crack this is your window context. If you have a content listener
at handling the uri. (can be null) you want to give first crack to, the uri loader needs to be able
to get it from the window context (we'll use nsIInterfaceRequestor).
we will also be using nsIInterfaceRequestor to get at the progress event
sink interface.
aReferringURI --> if a uri referral was involved.... aReferringURI --> if a uri referral was involved....
aOpenContext (in) --> if you've already opened a url before, and you still have aOpenContext (in) --> if you've already opened a url before, and you still have
the associated open context, you should pass it in here (can be null) the associated open context, you should pass it in here (can be null)
@ -78,8 +82,7 @@ interface nsIURILoader : nsISupports
void openURI(in nsIURI aURI, void openURI(in nsIURI aURI,
in string aWindowTarget, in string aWindowTarget,
in nsIProgressEventSink aProgressEventSink, in nsISupports aWindowContext,
in nsIURIContentListener aContentListener,
in nsIURI aReferringURI, in nsIURI aReferringURI,
in nsISupports aOpenContext, in nsISupports aOpenContext,
out nsISupports aCurrentOpenContext); out nsISupports aCurrentOpenContext);
@ -90,8 +93,7 @@ interface nsIURILoader : nsISupports
void openURIVia(in nsIURI aURI, void openURIVia(in nsIURI aURI,
in string aWindowTarget, in string aWindowTarget,
in nsIProgressEventSink aProgressEventSink, in nsISupports aWindowContext,
in nsIURIContentListener aContentListener,
in nsIURI aReferringURI, in nsIURI aReferringURI,
in nsISupports aOpenContext, in nsISupports aOpenContext,
out nsISupports aCurrentOpenContext, out nsISupports aCurrentOpenContext,
@ -108,3 +110,33 @@ interface nsIURILoader : nsISupports
out string aDesiredContentType, out string aDesiredContentType,
out nsIURIContentListener aTargetListener); out nsIURIContentListener aTargetListener);
}; };
/* This is a private interface used by layout in order to invoke the uri loader
while passing through a post data stream. I'm using a private interface instead of
bloating the generic nsIURILoader's openURI
*/
[scriptable, uuid(1A7CACA5-A1D8-11d3-98A4-001083010E9B)]
interface nsPIURILoaderWithPostData : nsISupports
{
void openURIWithPostData(in nsIURI aURI,
in string aWindowTarget,
in nsISupports aWindowContext,
in nsIURI aReferringURI,
in nsIInputStream aPostDataStream,
in nsISupports aOpenContext,
out nsISupports aCurrentOpenContext);
/* same call as OpenURI except this one takes an IP address to use as well...
adapterBinding -> the local IP address to bind to*/
void openURIWithPostDataVia(in nsIURI aURI,
in string aWindowTarget,
in nsISupports aWindowContext,
in nsIURI aReferringURI,
in nsIInputStream aPostDataStream,
in nsISupports aOpenContext,
out nsISupports aCurrentOpenContext,
in unsigned long adapterBinding);
};