WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIGlobalHistory3

IID:24306852-c60e-49c3-a455-90f6747118ba
Inherits From:nsIGlobalHistory2

Provides information about global history to gecko, extending GlobalHistory2

This interface is implemented by the following components:


Methods

void addDocumentRedirect ( nsIChannel oldChannel , nsIChannel newChannel , PRInt32 flags , PRBool topLevel ) PRUint32 getURIGeckoFlags ( nsIURI URI ) void setURIGeckoFlags ( nsIURI URI , PRUint32 flags )

void addDocumentRedirect ( nsIChannel oldChannel , nsIChannel newChannel , PRInt32 flags , PRBool topLevel )

Notifies the history system that the page loading via oldChannel redirected to newChannel. Implementations should generally add the URI for oldChannel to history for link coloring, but are advised not to expose it in the history user interface. This function is preferred if nsIGlobalHistory3 is available. Otherwise, nsIGlobalHistory2.addURI should be called with redirect=true.

This function is preferred to nsIGlobalHistory2.addURI because it provides more information (including the redirect destination, channels involved, and redirect flags) to the history implementation.

For implementors of nsIGlobalHistory3: The history implementation is responsible for sending NS_LINK_VISITED_EVENT_TOPIC to observers for redirect pages. This notification must be sent for history consumers for all non-redirect pages.

The other params to this function are the same as those for nsIChannelEventSink::OnChannelRedirect.

Note: Implementors who wish to implement this interface but rely on nsIGlobalHistory2.addURI for redirect processing may throw NS_ERROR_NOT_IMPLEMENTED from this method. If they do so, then callers must call nsIGlobalHistory2.addURI upon getting the NS_ERROR_NOT_IMPLEMENTED result.

Arguments:
oldChannel
newChannel
flags
topLevel

PRUint32 getURIGeckoFlags ( nsIURI URI )

Get the Gecko flags for this URI. These flags are used by Gecko as hints to optimize page loading. Not all histories have them; this need not be supported (just return NS_ERROR_NOT_IMPLEMENTED. These flags are opaque and should not be interpreted by the history engine.

Arguments:
URI

void setURIGeckoFlags ( nsIURI URI , PRUint32 flags )

Set the Gecko flags for this URI. May fail if the history entry doesn't have any flags or if there is no entry for the URI.

Arguments:
URI
flags

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com