remove protocol scheme check before using the uri loader. this
means that all urls will run through the uriloader regardless of
type when it gets turned on.
webshell:
doContent and canHandleContent now take a nsURILoaderCommand
modify the handle link click event method to pass in
in the nsIURILoader::viewUserClick command to the uri loader
r=travis
// to distinguish between incoming urls that are a result of user
// clicks vs. normal views, view source and requires new window
nsIURIContentListener.idl--> doContent and canHandleContent now take a nsIURILoadCommand enum
nsURILoader.cpp --> changes to account for load command enum.
AsyncRead pass in the window context as the url context
(waterson will need this for his chrome cache work)
if we can't find a content handler for the content then go
back to the original window that loaded the url and force
them to handle the content...this is a HACK to force us to run
through the old code path for handling unknown content types
until the new version is online.
r=travis
changes to support aWindowContext parameter and to remove
the content listener and progress sink as arguments. Instead,
use an interface requestor on the window context to get these.
I was also able to take out the capabilities class as well.
r=travis
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
is a mailto url. why? because it works so well for mailto =). No sense
in only allowing people turning uri dispatching on to get the benefits.
r=travis.
CanHandleContent now has an out parameter for desired content type.
Minor re-write of uri loder logic to incorporate stream conversion. If the content listener passes back
a desired content type that is different from the content type that we asked it to handle, we'll
automatically invoke a stream converter. This allows a doc shell which wants to handle say message/rfc822
to request that content be in the form of text/xul (i.e. if it was presenting the content).
Revamp the uri loader to excusively use AsyncRead instead of AsyncOpen and AsyncRead. With these changes,
we now only need to add the ability to retarget to our protocol channels instead of requiring both
retargeting and AsyncOpen support.
In order to do this, the DocumentOpenInfo object needed to become a nsIStreamListener instead of just
a stream observer.
Clean up OpenURI api. get rid of the verb, the channel context and the loadgroup as required arguments
to OpenURI.
Add nsUriLoaderEventSinkGetter class. Many method signatures
changed to match the changes to nsIURILoader::OpenURI.
Clean up OpenURI api. get rid of the verb, the channel context and the loadgroup as required arguments
to OpenURI.
Add the notion of a open uri context as an in and an out parameter. The open uri context is a cookie which
the caller can later give back to the uri loader when running another url in the same context. It's an ISupports
right now and the type should be opaque to the caller.
Don't require the caller to pass in an event sink getter. We can generate this for them. Do give them the ability
to pass in a nsIProgressEventSink. Note: this parameter is actually going to get changed into a nsIProgressListener
real soon as well. So don't get to used to it.
GetProtcocolHandler needs to pass in the uri we are trying to open so the
listener can pick an appropriate p.h. based on the protocol of the uri. (if
they so choose).
1) add OpenURIVia support.
2) reimplent DispatchContent so we ask the listener if it can handle the content. Then when (if) we find
a content listener that can handle it, call DoContent.
3) if we can't find a content listener, go to the registry and try to find a registered content handler.
This part isn't finished as eventually i need to be going to the category manager instead of forming
the progid for the content handler myself.
Add notion of CanHandleContent. This is supposed to be a light weight method for the implementor
such that the uri loader can ask right off the top if the listener can handle a particular content
type. If it can, then later on, the uir loader may call DoContent to actually handle it.
remove CanHandleConent. I don't think we need this. Also remove notion of getting a parent
content handler. This doesn't make sense anymore for how I'm defining a content handler.
Added progid prefix for content handler.
define and implement nsDocumentOpenInfo. Implement uri loader::OpenURI. This is the first pass at
my implementation it isn't complete and it doesn't use the registry for getting
protocol handlers and content handlers yet...but it's a start
expanded OpenURI interface to take all the required arguments we need in order to really open the uri.
This includes adding the command, window target, event sink getter, load group and channel context.
Added dispatchContent method which is used by the doc open info's to talk back to the uri loader.
DispatchContent takes an opened channel and the uri content listener.
doContent now returns a boolean called abortProcess. if the listener wants to handle the content without
returning a stream listener, i.e. it wants the uri loader to stop doing anything else with this content,
then it returns true for abort process.
channel to go away after we load the url instead of making it stick around until the next url comes in (that's
when we used to get rid of the previous channel).
r=rpotts.
As this changed the generated interface signatures, I had to change all of the uses to avoid bustage. Any corners of the browser that aren't built by default, or that I haven't discovered how to build, may be at risk of bustage if they use string or wstring attributes. (This could mean blackwood; sorry, guys!)
Many thanks to Alec Flett (alecf@netscape.com) for preparing diffs for the mailnews portion of the signature changes; thanks also to Ariel Backenroth (arielb@rice.edu) and Mike Shaver (shaver@mozilla.org) for help with updating the tree with NS_DECL_NSIFOO macros; everwhere where one of these macros was used was one less place I had to manually add 'const'.
Also removed extraneous space from generated method signatures, leftover from Brendan's capitalization spam, and made 'const decl must be of type short or long' an error rather than just a warning.
Added nsNetFactory implementation. This allows users to retrieve nsINetService pointers from the service factory manager.
M dom/src/base/nsGlobalWindow.cpp
M gfx/src/nsImageNetContextSync.cpp
M layout/html/document/src/nsHTMLDocument.cpp
M network/module/nsURL.cpp
Replaced NS_NewINetService() calls with nsServiceManager::GetService() calls.
M network/module/Makefile
M network/module/makefile.win
Added nsNetFactory.cpp to the builds.
M network/module/nsINetService.h
Added a #define for the class id of the nsNetService.
M network/module/nsIStreamListener.h
Removed the NS_DEFINE_IID of kIStreamListenerIID from the header file. Each module that wants this will need to delcare it themselves.
M network/module/nsNetFile.cpp
Fixed memory leak.
M network/module/nsNetService.cpp
Globalized the gNetlibService variable so the NetFactory can access it.
M webshell/src/nsDocLoader.cpp
M webshell/src/nsPluginViewer.cpp
NS_DEFINE_IID of kIStreamListenerIID
M webshell/tests/viewer/nsSetupRegistry.cpp
Added the netlib library to the list of libraries in the registry and register the nsNetFactory with the appropriate iid and clsids.
nsIDocumentLoader interface method change to LoadURL() we now accept a local ip address.
M webshell/public/nsIWebShell.h
1. Extended the nsIWebShell LoadURL() method to take an additional PRUint32 parameter which represents an ip address. If specified, this address will be bound to the socket prior to connection as the local/client ip address to be used. The caller is guarantees the validity of this address.
2. Extended the nsReloadType enumeration to allow both proxy and cache bypass.
M webshell/src/nsDocLoader.cpp
1. Extended nsDocumentBindInfo::Bind() to take an additional nsILoadAttribs pointer. (class definitaion change and implementation).
2. Extended nsDocLoaderImpl::LoadURL() to take an additional PRUint32 param which represents an optional local ip address to bind the connecting socket to, prior to connection. (class definitaion change and implementation) The docloader object maintains a pointer to an nsILoadAttribs interface.
M webshell/src/nsWebShell.cpp
Implemented new LoadURL() routine. Simple pass down to doc loader of PRUint32.
M webshell/tests/ComFactory/makefile.win
Added netlib to the list of prerequisites.
Extended the nsIDocumentLoader interface's LoadURL() method to take a reload type parameter.
webshell/public/nsIWebShell.h
Extended the nsIWebShell interface's LoadURL() method to take a reload type parameter.
webshell/src/nsDocLoader.cpp
1. Extended the nsIDocumentBindInfo interface's Bind() method to take a reload type parameter. The Bind() method now takes the reload parameter and passes it to the nsIUrl it creates.
2. Added support to the DocumentLoader for the extended LoadURL() parameter list. It now passes the reload type down into the Bind() method of the nsIDocumentBindInfo.
webshell/src/nsWebShell.cpp
1. Added support to the nsWebShell to use the new reload type parameter during loads.
2. Hooked up the reload type parameter in the nsWebShell::Reload() method so we actually use it.
Removed support for the underlying timer/refreshurl infrastructure.
webshell/src/nsDocLoader.cpp
1. Added support in nsDocumentBindInfo for the new nsIRefreshUrl method for cancelling.
1.5 Changed the refreshurl() method so it delegates to the container's (i.e. webshell's) refreshurl() method.
2. Removed the "actual" refresh url implementation (timers) from the nsDocumentBindInfo. It's now in the webshell and nsDocumentBindInfo's implementation of nsIRefreshUrl simply delegates to the "container" (i.e. the webshell).
3. Added call to new NS_NewURL() routine which takes an nsISupports pointer as an arg, if the nsDocumentBindInfo has a container to pass along.
webshell/src/nsWebShell.cpp
Added support for the nsIRefreshUrl interface to nsWebShell (this includes the underlying timers and callback mechanism).
310133 - 1. added LoadURLOnTimer() and CancelLoadURLTimer() implementations to the nsDocLoaderImpl class.
2. Changed nsDocumentBindInfo class to support the nsIRefreshUrl interface.
3. Changed the nsDocumentBindInfo contructor to set the m_ExtraInfo variable to the aExtraInfo pointer passed in. This must have been an oversight on the part of the original implementor.
4. Added a simple data placeholder class to hold the data that will be used to load the url on the timer.
webshell/src/nsWebShell.cpp -
1. 310133 - When the webshell is destructed or about to load a new url, the loader now calls CancelLoadURLTimer() which cancels and releases the timers.