nsIGlobalHistory3
From MDC
The nsIGlobalHistory3 provides information about global history to Gecko. It was originally created as part of nsIGlobalHistory2, but was split off during the transition to Places.
Contents |
nsIGlobalHistory3 is defined in docshell/base/nsIGlobalHistory3.idl. It is scriptable and
unfrozen (hasn't changed since Mozilla 1.9).
Inherits from: nsIGlobalHistory2
[edit] Method overview
void addDocumentRedirect(in
|
unsigned long getURIGeckoFlags(in
|
void setURIGeckoFlags(in
|
[edit] Methods
[edit] addDocumentRedirect()
Notifies the history system that the page loading via aOldChannel redirected to aNewChannel. Implementations should generally add the URI for aOldChannel 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().
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. void addDocumentRedirect(nsIChannel aOldChannel,
nsIChannel aNewChannel,
PRInt32 aFlags,
boolean aTopLevel);
[edit] Parameters
- aOldChannel
- aNewChannel
- aFlags
- Flags to add. These are defined by the history that is implementing this interface.
- aTopLevel
- Whether the URI is loaded in a top-level window. If
false, the load is in a subframe.
[edit] getURIGeckoFlags()
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.
unsigned long getURIGeckoFlags(nsIURI aURI);
[edit] Parameters
- aURI
- The
nsIURIto get flags for. Flags are defined by the history that is implementing this interface.
[edit] Return value
The Gecko flags for the URI.
[edit] setURIGeckoFlags()
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.
void setURIGeckoFlags(nsIURI aURI, unsigned long aFlags);
[edit] Parameters
- aURI
- The
nsIURIto add flags for. - aFlags
- The flags to add. These are defined by the history that is implementing this interface.