DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * The contents of this file are subject to the Mozilla Public
 * License Version 1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of
 * the License at http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * rights and limitations under the License.
 * 
 * The Original Code is the Mozilla browser.
 * 
 * The Initial Developer of the Original Code is Netscape
 * Communications, Inc.  Portions created by Netscape are
 * Copyright (C) 1999, Mozilla.  All Rights Reserved.
 * 
 * Contributor(s):
 *   Travis Bogard <travis@netscape.com>
 */

#include "nsISupports.idl"

/**
 * The nsIWebProgressListener interface is implemented by clients wishing to 
 * listen in on the progress associated with the loading of documents.
 *
 * @status UNDER_REVIEW
 */

interface nsIWebProgress;
interface nsIRequest;
interface nsIURI;

[scriptable, uuid(570F39D1-EFD0-11d3-B093-00A024FFC08C)]
interface nsIWebProgressListener : nsISupports
{
 /**
  * Progress state transition bits.
  * These flags indicate the various states that documents and requests
  * may transition through as they are being loaded.
  */
  const unsigned long STATE_START          = 0x00000001;
  const unsigned long STATE_REDIRECTING    = 0x00000002;
  const unsigned long STATE_TRANSFERRING   = 0x00000004;
  const unsigned long STATE_NEGOTIATING    = 0x00000008;
  const unsigned long STATE_STOP           = 0x00000010;

 /**
  * Progress State type bits.
  * These flags indicate whether the transition is occuring on a document
  * or an individual request within the document.
  */
  const unsigned long STATE_IS_REQUEST     = 0x00010000;
  const unsigned long STATE_IS_DOCUMENT    = 0x00020000;
  const unsigned long STATE_IS_NETWORK     = 0x00040000;
  const unsigned long STATE_IS_WINDOW      = 0x00080000;

 /**
  * Security state bits
  */
  const unsigned long STATE_IS_INSECURE     = 0x00000004;
  const unsigned long STATE_IS_BROKEN       = 0x00000001;
  const unsigned long STATE_IS_SECURE       = 0x00000002;

  const unsigned long STATE_SECURE_HIGH     = 0x00040000;
  const unsigned long STATE_SECURE_MED      = 0x00010000;
  const unsigned long STATE_SECURE_LOW      = 0x00020000;


 /**
  * Notification indicating the state has changed for one of the requests
  * associated with the document loaded.
  *
  * @param aWebProgress    The nsIWebProgress instance that fired the
  *                        notification
  *
  * @param aRequest        The nsIRequest which has changed state.
  *
  * @param aStateFlags     Flags indicating the state change.
  *
  * @param aStatus         Error status code associated with the state change.
  * This parameter should be ignored unless the status flag includes the
  * STATE_STOP bit. The status code will indicate success / failure of the
  * request associated with the state change.
  *
  * @return                NS_OK should always be returned.
  */
  void onStateChange(in nsIWebProgress aWebProgress,
                     in nsIRequest aRequest,
                     in unsigned long aStateFlags,
                     in nsresult aStatus);

 /**
  * Notification that the progress has changed for one of the requests being
  * monitored.
  *
  * @param aWebProgress        The nsIWebProgress instance that fired the
  *                            notification
  *
  * @param aRequest            The nsIRequest that has new progress.
  *
  * @param aCurSelfProgress    The current progress for aRequest.
  *
  * @param aMaxSelfProgress    The maximum progress for aRequest.  If this
  *                            value is not known then -1 is passed.
  *
  * @param aCurTotalProgress   The current progress for all the requests
  *                            being monitored.
  *
  * @param aMaxTotalProgress   The total progress for all the requests being
  *                            monitored.  If this value is not known then
  *                            -1 is passed.
  *
  * @return                    NS_OK should always be returned.
  */
  void onProgressChange(in nsIWebProgress aWebProgress,
                        in nsIRequest aRequest,
                        in long aCurSelfProgress,
                        in long aMaxSelfProgress,
                        in long aCurTotalProgress,
                        in long aMaxTotalProgress);
 /**
  * Called when the window being watched changes the location that is currently.
  * This is not when a load is requested, but rather once it is verified that 
  * the load is going to occur in the given window.  For instance, a load that
  * starts in a window might send progress and status messages, for the new site
  * but it will not send the onLocationChange until we are sure we are loading
  * this new page here.
  *
  * @param location   The URI of the location that is being loaded.
  *
  * @return           NS_OK should always be returned.
  */
  void onLocationChange(in nsIWebProgress aWebProgress,
                        in nsIRequest aRequest,
                        in nsIURI location);

 /**
  * Notification that the status has changed. The status message is usually
  * printed in the status bar of the browser.
  *
  * @return           NS_OK should always be returned.
  */
  void onStatusChange(in nsIWebProgress aWebProgress,
                      in nsIRequest aRequest,
                      in nsresult aStatus,
                      in wstring aMessage);


 /**
  * Notification called for security progress.  
  * This method will be called on security transitions (eg HTTP -> HTTPS, 
  * HTTPS -> HTTP, FOO -> https) and after document load completion.  
  * It might also be called if an error occurs during network loading.
  *
  * These notification will only occur if a security package is installed.
  *
  * @return           NS_OK should always be returned.
  */


  void onSecurityChange(in nsIWebProgress aWebProgress,
                        in nsIRequest aRequest,
                        in unsigned long state);
};