uriloader/base/nsIWebProgress.idl

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIDOMWindow;
michael@0 10 interface nsIWebProgressListener;
michael@0 11
michael@0 12 /**
michael@0 13 * The nsIWebProgress interface is used to add or remove nsIWebProgressListener
michael@0 14 * instances to observe the loading of asynchronous requests (usually in the
michael@0 15 * context of a DOM window).
michael@0 16 *
michael@0 17 * nsIWebProgress instances may be arranged in a parent-child configuration,
michael@0 18 * corresponding to the parent-child configuration of their respective DOM
michael@0 19 * windows. However, in some cases a nsIWebProgress instance may not have an
michael@0 20 * associated DOM window. The parent-child relationship of nsIWebProgress
michael@0 21 * instances is not made explicit by this interface, but the relationship may
michael@0 22 * exist in some implementations.
michael@0 23 *
michael@0 24 * A nsIWebProgressListener instance receives notifications for the
michael@0 25 * nsIWebProgress instance to which it added itself, and it may also receive
michael@0 26 * notifications from any nsIWebProgress instances that are children of that
michael@0 27 * nsIWebProgress instance.
michael@0 28 */
michael@0 29 [scriptable, uuid(bd0efb3b-1c81-4fb0-b16d-576a2be48a95)]
michael@0 30 interface nsIWebProgress : nsISupports
michael@0 31 {
michael@0 32 /**
michael@0 33 * The following flags may be combined to form the aNotifyMask parameter for
michael@0 34 * the addProgressListener method. They limit the set of events that are
michael@0 35 * delivered to an nsIWebProgressListener instance.
michael@0 36 */
michael@0 37
michael@0 38 /**
michael@0 39 * These flags indicate the state transistions to observe, corresponding to
michael@0 40 * nsIWebProgressListener::onStateChange.
michael@0 41 *
michael@0 42 * NOTIFY_STATE_REQUEST
michael@0 43 * Only receive the onStateChange event if the aStateFlags parameter
michael@0 44 * includes nsIWebProgressListener::STATE_IS_REQUEST.
michael@0 45 *
michael@0 46 * NOTIFY_STATE_DOCUMENT
michael@0 47 * Only receive the onStateChange event if the aStateFlags parameter
michael@0 48 * includes nsIWebProgressListener::STATE_IS_DOCUMENT.
michael@0 49 *
michael@0 50 * NOTIFY_STATE_NETWORK
michael@0 51 * Only receive the onStateChange event if the aStateFlags parameter
michael@0 52 * includes nsIWebProgressListener::STATE_IS_NETWORK.
michael@0 53 *
michael@0 54 * NOTIFY_STATE_WINDOW
michael@0 55 * Only receive the onStateChange event if the aStateFlags parameter
michael@0 56 * includes nsIWebProgressListener::STATE_IS_WINDOW.
michael@0 57 *
michael@0 58 * NOTIFY_STATE_ALL
michael@0 59 * Receive all onStateChange events.
michael@0 60 */
michael@0 61 const unsigned long NOTIFY_STATE_REQUEST = 0x00000001;
michael@0 62 const unsigned long NOTIFY_STATE_DOCUMENT = 0x00000002;
michael@0 63 const unsigned long NOTIFY_STATE_NETWORK = 0x00000004;
michael@0 64 const unsigned long NOTIFY_STATE_WINDOW = 0x00000008;
michael@0 65 const unsigned long NOTIFY_STATE_ALL = 0x0000000f;
michael@0 66
michael@0 67 /**
michael@0 68 * These flags indicate the other events to observe, corresponding to the
michael@0 69 * other four methods defined on nsIWebProgressListener.
michael@0 70 *
michael@0 71 * NOTIFY_PROGRESS
michael@0 72 * Receive onProgressChange events.
michael@0 73 *
michael@0 74 * NOTIFY_STATUS
michael@0 75 * Receive onStatusChange events.
michael@0 76 *
michael@0 77 * NOTIFY_SECURITY
michael@0 78 * Receive onSecurityChange events.
michael@0 79 *
michael@0 80 * NOTIFY_LOCATION
michael@0 81 * Receive onLocationChange events.
michael@0 82 *
michael@0 83 * NOTIFY_REFRESH
michael@0 84 * Receive onRefreshAttempted events.
michael@0 85 * This is defined on nsIWebProgressListener2.
michael@0 86 */
michael@0 87 const unsigned long NOTIFY_PROGRESS = 0x00000010;
michael@0 88 const unsigned long NOTIFY_STATUS = 0x00000020;
michael@0 89 const unsigned long NOTIFY_SECURITY = 0x00000040;
michael@0 90 const unsigned long NOTIFY_LOCATION = 0x00000080;
michael@0 91 const unsigned long NOTIFY_REFRESH = 0x00000100;
michael@0 92
michael@0 93 /**
michael@0 94 * This flag enables all notifications.
michael@0 95 */
michael@0 96 const unsigned long NOTIFY_ALL = 0x000001ff;
michael@0 97
michael@0 98 /**
michael@0 99 * Registers a listener to receive web progress events.
michael@0 100 *
michael@0 101 * @param aListener
michael@0 102 * The listener interface to be called when a progress event occurs.
michael@0 103 * This object must also implement nsISupportsWeakReference.
michael@0 104 * @param aNotifyMask
michael@0 105 * The types of notifications to receive.
michael@0 106 *
michael@0 107 * @throw NS_ERROR_INVALID_ARG
michael@0 108 * Indicates that aListener was either null or that it does not
michael@0 109 * support weak references.
michael@0 110 * @throw NS_ERROR_FAILURE
michael@0 111 * Indicates that aListener was already registered.
michael@0 112 */
michael@0 113 void addProgressListener(in nsIWebProgressListener aListener,
michael@0 114 in unsigned long aNotifyMask);
michael@0 115
michael@0 116 /**
michael@0 117 * Removes a previously registered listener of progress events.
michael@0 118 *
michael@0 119 * @param aListener
michael@0 120 * The listener interface previously registered with a call to
michael@0 121 * addProgressListener.
michael@0 122 *
michael@0 123 * @throw NS_ERROR_FAILURE
michael@0 124 * Indicates that aListener was not registered.
michael@0 125 */
michael@0 126 void removeProgressListener(in nsIWebProgressListener aListener);
michael@0 127
michael@0 128 /**
michael@0 129 * The DOM window associated with this nsIWebProgress instance.
michael@0 130 *
michael@0 131 * @throw NS_ERROR_FAILURE
michael@0 132 * Indicates that there is no associated DOM window.
michael@0 133 */
michael@0 134 readonly attribute nsIDOMWindow DOMWindow;
michael@0 135 readonly attribute uint64_t DOMWindowID;
michael@0 136
michael@0 137 /**
michael@0 138 * Indicates whether DOMWindow.top == DOMWindow.
michael@0 139 */
michael@0 140 readonly attribute boolean isTopLevel;
michael@0 141
michael@0 142 /**
michael@0 143 * Indicates whether or not a document is currently being loaded
michael@0 144 * in the context of this nsIWebProgress instance.
michael@0 145 */
michael@0 146 readonly attribute boolean isLoadingDocument;
michael@0 147
michael@0 148 /**
michael@0 149 * Contains a load type as specified by the load* constants in
michael@0 150 * nsIDocShellLoadInfo.idl.
michael@0 151 */
michael@0 152 readonly attribute unsigned long loadType;
michael@0 153 };

mercurial