зеркало из https://github.com/mozilla/gecko-dev.git
documentation cleanup for bug 99625
This commit is contained in:
Родитель
87c83c4bff
Коммит
c195959d6b
|
@ -1,5 +1,4 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -22,6 +21,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Travis Bogard <travis@netscape.com>
|
||||
* Darin Fisher <darin@meer.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -36,24 +36,22 @@
|
|||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
|
||||
/**
|
||||
* The nsIWebNavigation interface defines an interface for navigating the web.
|
||||
* It provides methods and attributes to direct an object to navigate to a new
|
||||
* location, stop or restart an in process load or determine where the object,
|
||||
* has previously gone.
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
|
||||
interface nsIDOMDocument;
|
||||
interface nsIInputStream;
|
||||
interface nsISHistory;
|
||||
interface nsISHEntry;
|
||||
interface nsIURI;
|
||||
|
||||
/**
|
||||
* The nsIWebNavigation interface defines an interface for navigating the web.
|
||||
* It provides methods and attributes to direct an object to navigate to a new
|
||||
* location, stop or restart an in process load, or determine where the object
|
||||
* has previously gone.
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
[scriptable, uuid(F5D9E7B0-D930-11d3-B057-00A024FFC08C)]
|
||||
interface nsIWebNavigation : nsISupports
|
||||
{
|
||||
|
@ -70,78 +68,100 @@ interface nsIWebNavigation : nsISupports
|
|||
readonly attribute boolean canGoForward;
|
||||
|
||||
/**
|
||||
* Tells the object to navigate to the previous session history item. When
|
||||
* a page is loaded from session history, all content is loaded from the
|
||||
* cache (if available) and page state (such as form values, scroll position)
|
||||
* is restored.
|
||||
* Tells the object to navigate to the previous session history item. When a
|
||||
* page is loaded from session history, all content is loaded from the cache
|
||||
* (if available) and page state (such as form values and scroll position) is
|
||||
* restored.
|
||||
*
|
||||
* @return NS_OK - Backward navigation was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't go back right now.
|
||||
* @throw NS_ERROR_UNEXPECTED
|
||||
* Indicates that the call was unexpected at this time, which implies
|
||||
* that canGoBack is false.
|
||||
*/
|
||||
void goBack();
|
||||
|
||||
/**
|
||||
* Tells the object to navigate to the next Forward session history item.
|
||||
* When a page is loaded from session history, all content is loaded from
|
||||
* the cache (if available) and page state (such as form values, scroll
|
||||
* position) is restored.
|
||||
* Tells the object to navigate to the next session history item. When a
|
||||
* page is loaded from session history, all content is loaded from the cache
|
||||
* (if available) and page state (such as form values and scroll position) is
|
||||
* restored.
|
||||
*
|
||||
* @return NS_OK - Forward was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't go forward right now.
|
||||
* @throw NS_ERROR_UNEXPECTED
|
||||
* Indicates that the call was unexpected at this time, which implies
|
||||
* that canGoForward is false.
|
||||
*/
|
||||
void goForward();
|
||||
|
||||
/**
|
||||
* Tells the object to navigate to the session history item at index.
|
||||
* Tells the object to navigate to the session history item at a given index.
|
||||
*
|
||||
* @return NS_OK - GotoIndex was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't goto that index
|
||||
* @throw NS_ERROR_UNEXPECTED
|
||||
* Indicates that the call was unexpected at this time, which implies
|
||||
* that session history entry at the given index does not exist.
|
||||
*/
|
||||
void gotoIndex(in long index);
|
||||
|
||||
/****************************************************************************
|
||||
* The following flags may be bitwise combined to form the load flags
|
||||
* parameter passed to either the loadURI or reload method. Some of these
|
||||
* flags are only applicable to loadURI.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load flags for use with loadURI() and reload()
|
||||
* This flags defines the range of bits that may be specified.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_MASK = 0xffff;
|
||||
|
||||
/**
|
||||
* loadURI() specific flags
|
||||
*/
|
||||
|
||||
/**
|
||||
* Normal load flag.
|
||||
* This is the default value for the load flags parameter.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_NONE = 0x0000;
|
||||
|
||||
/**
|
||||
* Meta-refresh flag. The cache is bypassed. This type of load is
|
||||
* usually the result of a meta-refresh tag, or a HTTP
|
||||
* 'refresh' header.
|
||||
* This flag specifies that the load should have the semantics of an HTML
|
||||
* Meta-refresh tag (i.e., that the cache should be bypassed). This flag
|
||||
* is only applicable to loadURI.
|
||||
* XXX the meaning of this flag is poorly defined.
|
||||
* XXX no one uses this, so we should probably deprecate and remove it.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_IS_REFRESH = 0x0010;
|
||||
|
||||
/**
|
||||
* Link-click flag.
|
||||
* This flag specifies that the load should have the semantics of a link
|
||||
* click. This flag is only applicable to loadURI.
|
||||
* XXX the meaning of this flag is poorly defined.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_IS_LINK = 0x0020;
|
||||
|
||||
/**
|
||||
* Bypass history flag.
|
||||
* This flag specifies that history should not be updated. This flag is only
|
||||
* applicable to loadURI.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_BYPASS_HISTORY = 0x0040;
|
||||
|
||||
/**
|
||||
* Replace history entry flag.
|
||||
* This flag specifies that any existing history entry should be replaced.
|
||||
* This flag is only applicable to loadURI.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_REPLACE_HISTORY = 0x0080;
|
||||
|
||||
/* loadURI() & reload() specific flags */
|
||||
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100; // Bypass the cache
|
||||
const unsigned long LOAD_FLAGS_BYPASS_PROXY = 0x0200; // Bypass the proxy
|
||||
const unsigned long LOAD_FLAGS_CHARSET_CHANGE = 0x0400; // Reload because of charset change,
|
||||
/**
|
||||
* This flag specifies that the local web cache should be bypassed, but an
|
||||
* intermediate proxy cache could still be used to satisfy the load.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100;
|
||||
|
||||
/**
|
||||
* This flag specifies that any intermediate proxy caches should be bypassed
|
||||
* (i.e., that the content should be loaded from the origin server).
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_BYPASS_PROXY = 0x0200;
|
||||
|
||||
/**
|
||||
* This flag specifies that a reload was triggered as a result of detecting
|
||||
* an incorrect character encoding while parsing a previously loaded
|
||||
* document.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_CHARSET_CHANGE = 0x0400;
|
||||
|
||||
/**
|
||||
* If this flag is set, Stop() will be called before the load starts
|
||||
|
@ -154,58 +174,85 @@ interface nsIWebNavigation : nsISupports
|
|||
/**
|
||||
* Loads a given URI. This will give priority to loading the requested URI
|
||||
* in the object implementing this interface. If it can't be loaded here
|
||||
* however, the URL dispatcher will go through its normal process of content
|
||||
* however, the URI dispatcher will go through its normal process of content
|
||||
* loading.
|
||||
*
|
||||
* @param uri - The URI string to load.
|
||||
* @param loadFlags - Flags modifying load behaviour. Generally you will pass
|
||||
* LOAD_FLAGS_NONE for this parameter.
|
||||
* @param referrer - The referring URI. If this argument is NULL, the
|
||||
* referring URI will be inferred internally.
|
||||
* @param postData - nsIInputStream containing POST data for the request.
|
||||
* @param aURI
|
||||
* The URI string to load. For HTTP and FTP URLs and possibly others,
|
||||
* characters above U+007F will be converted to UTF-8 and then URL-
|
||||
* escaped per the rules of RFC 2396.
|
||||
* @param aLoadFlags
|
||||
* Flags modifying load behaviour. This parameter is a bitwise
|
||||
* combination of the load flags defined above. (Undefined bits are
|
||||
* reserved for future use.) Generally you will pass LOAD_FLAGS_NONE
|
||||
* for this parameter.
|
||||
* @param aReferrer
|
||||
* The referring URI. If this argument is null, then the referring
|
||||
* URI will be inferred internally.
|
||||
* @param aPostData
|
||||
* If the URI corresponds to a HTTP request, then this stream is
|
||||
* appended directly to the HTTP request headers. It may be prefixed
|
||||
* with additional HTTP headers. This stream must contain a "\r\n"
|
||||
* sequence separating any HTTP headers from the HTTP request body.
|
||||
* This parameter is optional and may be null.
|
||||
* @param aHeaders
|
||||
* If the URI corresponds to a HTTP request, then any HTTP headers
|
||||
* contained in this stream are set on the HTTP request. The HTTP
|
||||
* header stream is formatted as:
|
||||
* ( HEADER "\r\n" )*
|
||||
* This parameter is optional and may be null.
|
||||
*/
|
||||
void loadURI(in wstring uri,
|
||||
in unsigned long loadFlags,
|
||||
in nsIURI referrer,
|
||||
in nsIInputStream postData,
|
||||
in nsIInputStream headers);
|
||||
void loadURI(in wstring aURI,
|
||||
in unsigned long aLoadFlags,
|
||||
in nsIURI aReferrer,
|
||||
in nsIInputStream aPostData,
|
||||
in nsIInputStream aHeaders);
|
||||
|
||||
/**
|
||||
* Tells the Object to reload the current page.
|
||||
* Tells the Object to reload the current page. There may be cases where the
|
||||
* user will be asked to confirm the reload (for example, when it is
|
||||
* determined that the request is non-idempotent).
|
||||
*
|
||||
* @param reloadFlags - Flags modifying reload behaviour. Generally you will
|
||||
* pass LOAD_FLAGS_NONE for this parameter.
|
||||
* @throws NS_BINDING_ABORTED if the user cancels the reload.
|
||||
* @param aReloadFlags
|
||||
* Flags modifying load behaviour. This parameter is a bitwise
|
||||
* combination of the Load Flags defined above. (Undefined bits are
|
||||
* reserved for future use.) Generally you will pass LOAD_FLAGS_NONE
|
||||
* for this parameter.
|
||||
*
|
||||
* @throw NS_BINDING_ABORTED
|
||||
* Indicating that the user canceled the reload.
|
||||
*/
|
||||
void reload(in unsigned long reloadFlags);
|
||||
void reload(in unsigned long aReloadFlags);
|
||||
|
||||
/**
|
||||
* Stop() flags:
|
||||
/****************************************************************************
|
||||
* The following flags may be passed as the stop flags parameter to the stop
|
||||
* method defined on this interface.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Stop all network activity. This includes both active network loads and
|
||||
* pending meta-refreshes.
|
||||
* This flag specifies that all network activity should be stopped. This
|
||||
* includes both active network loads and pending META-refreshes.
|
||||
*/
|
||||
const unsigned long STOP_NETWORK = 0x01;
|
||||
|
||||
/**
|
||||
* Stop all content activity. This includes animated images, plugins and
|
||||
* pending Javascript timeouts.
|
||||
* This flag specifies that all content activity should be stopped. This
|
||||
* includes animated images, plugins and pending Javascript timeouts.
|
||||
*/
|
||||
const unsigned long STOP_CONTENT = 0x02;
|
||||
|
||||
/**
|
||||
* Stop all activity.
|
||||
* This flag specifies that all activity should be stopped.
|
||||
*/
|
||||
const unsigned long STOP_ALL = 0x03;
|
||||
|
||||
/**
|
||||
* Stops a load of a URI.
|
||||
*
|
||||
* @param stopFlags - Flags indicating the stop behavior.
|
||||
* @param aStopFlags
|
||||
* This parameter is one of the stop flags defined above.
|
||||
*/
|
||||
void stop(in unsigned long stopFlags);
|
||||
void stop(in unsigned long aStopFlags);
|
||||
|
||||
/**
|
||||
* Retrieves the current DOM document for the frame, or lazily creates a
|
||||
|
@ -220,13 +267,12 @@ interface nsIWebNavigation : nsISupports
|
|||
readonly attribute nsIURI currentURI;
|
||||
|
||||
/**
|
||||
* The referring URI.
|
||||
* The referring URI for the currently loaded URI or null.
|
||||
*/
|
||||
readonly attribute nsIURI referringURI;
|
||||
|
||||
/**
|
||||
* The session history object used to store the session history for the
|
||||
* session.
|
||||
* The session history object used by this web navigation instance.
|
||||
*/
|
||||
attribute nsISHistory sessionHistory;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче