summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsIRefreshURI.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /docshell/base/nsIRefreshURI.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'docshell/base/nsIRefreshURI.idl')
-rw-r--r--docshell/base/nsIRefreshURI.idl91
1 files changed, 91 insertions, 0 deletions
diff --git a/docshell/base/nsIRefreshURI.idl b/docshell/base/nsIRefreshURI.idl
new file mode 100644
index 000000000..5abd829da
--- /dev/null
+++ b/docshell/base/nsIRefreshURI.idl
@@ -0,0 +1,91 @@
+/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+interface nsIChannel;
+interface nsIPrincipal;
+interface nsIURI;
+
+[scriptable, uuid(a5e61a3c-51bd-45be-ac0c-e87b71860656)]
+interface nsIRefreshURI : nsISupports {
+ /**
+ * Load a uri after waiting for aMillis milliseconds. If the docshell
+ * is busy loading a page currently, the refresh request will be
+ * queued and executed when the current load finishes.
+ *
+ * @param aUri The uri to refresh.
+ * @param aPrincipal The triggeringPrincipal for the refresh load
+ * May be null, in which case a principal will be built based on the
+ * referrer URI of the previous docshell load, or will use the system
+ * principal when there is no referrer.
+ * @param aMillis The number of milliseconds to wait.
+ * @param aRepeat Flag to indicate if the uri is to be
+ * repeatedly refreshed every aMillis milliseconds.
+ * @param aMetaRefresh Flag to indicate if this is a Meta refresh.
+ */
+ void refreshURI(in nsIURI aURI,
+ in long aMillis, in boolean aRepeat,
+ in boolean aMetaRefresh,
+ [optional] in nsIPrincipal aPrincipal);
+
+ /**
+ * Loads a URI immediately as if it were a refresh.
+ *
+ * @param aURI The URI to refresh.
+ * @param aPrincipal The triggeringPrincipal for the refresh load
+ * May be null, in which case a principal will be built based on the
+ * referrer URI of the previous docshell load, or will use the system
+ * principal when there is no referrer.
+ * @param aMillis The number of milliseconds by which this refresh would
+ * be delayed if it were not being forced.
+ * @param aMetaRefresh Flag to indicate if this is a meta refresh.
+ */
+ void forceRefreshURI(in nsIURI aURI,
+ in long aMillis, in boolean aMetaRefresh,
+ [optional] in nsIPrincipal aPrincipal);
+
+ /**
+ * Checks the passed in channel to see if there is a refresh header,
+ * if there is, will setup a timer to refresh the uri found
+ * in the header. If docshell is busy loading a page currently, the
+ * request will be queued and executed when the current page
+ * finishes loading.
+ *
+ * Returns the NS_REFRESHURI_HEADER_FOUND success code if a refresh
+ * header was found and successfully setup.
+ *
+ * @param aChannel The channel to be parsed.
+ */
+ void setupRefreshURI(in nsIChannel aChannel);
+
+ /**
+ * Parses the passed in header string and sets up a refreshURI if
+ * a "refresh" header is found. If docshell is busy loading a page
+ * currently, the request will be queued and executed when
+ * the current page finishes loading.
+ *
+ * @param aBaseURI base URI to resolve refresh uri with.
+ * @param aPrincipal The triggeringPrincipal for the refresh load
+ * May be null, in which case a principal will be built based on the
+ * referrer URI of the previous docshell load, or will use the system
+ * principal when there is no referrer.
+ * @param aHeader The meta refresh header string.
+ */
+ void setupRefreshURIFromHeader(in nsIURI aBaseURI,
+ in nsIPrincipal principal,
+ in ACString aHeader);
+
+ /**
+ * Cancels all timer loads.
+ */
+ void cancelRefreshURITimers();
+
+ /**
+ * True when there are pending refreshes, false otherwise.
+ */
+ readonly attribute boolean refreshPending;
+};