Back to index

lightning-sunbird  0.9+nobinonly
nsIDocShell.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is the Mozilla browser.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications, Inc.
00020  * Portions created by the Initial Developer are Copyright (C) 1999
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Travis Bogard <travis@netscape.com>
00025  *   Steve Clark <buster@netscape.com>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either of the GNU General Public License Version 2 or later (the "GPL"),
00029  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 #include "nsISupports.idl"
00042 
00043 %{ C++
00044 class nsPresContext;
00045 class nsIPresShell;
00046 %}
00047 
00052 [ptr] native nsPresContext(nsPresContext);
00053 [ptr] native nsIPresShell(nsIPresShell);
00054 
00055 interface nsIURI;
00056 interface nsIChannel;
00057 interface nsIContentViewer;
00058 interface nsIURIContentListener;
00059 interface nsIChromeEventHandler;
00060 interface nsIDocShellLoadInfo;
00061 interface nsIDocumentCharsetInfo;
00062 interface nsIWebNavigation;
00063 interface nsISimpleEnumerator;
00064 interface nsIInputStream;
00065 interface nsIRequest;
00066 interface nsISHEntry;
00067 interface nsILayoutHistoryState;
00068 interface nsISecureBrowserUI;
00069 interface nsIDOMStorage;
00070 
00071 [scriptable, uuid(9f0c7461-b9a4-47f6-b88c-421dce1bce66)]
00072 interface nsIDocShell : nsISupports
00073 {
00090   [noscript]void loadURI(in nsIURI uri,
00091                          in nsIDocShellLoadInfo loadInfo,
00092                          in unsigned long aLoadFlags,
00093                          in boolean firstParty);
00094 
00114   [noscript]void loadStream(in nsIInputStream aStream,
00115                             in nsIURI aURI,
00116                             in ACString aContentType,
00117                             in ACString aContentCharset,
00118                             in nsIDocShellLoadInfo aLoadInfo);
00119 
00120   const long INTERNAL_LOAD_FLAGS_NONE                    = 0x0;
00121   const long INTERNAL_LOAD_FLAGS_INHERIT_OWNER           = 0x1;
00122   const long INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER      = 0x2;
00123   const long INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 0x4;
00124 
00125   // This flag marks the first load in this object
00126   // @see nsIWebNavigation::LOAD_FLAGS_FIRST_LOAD
00127   const long INTERNAL_LOAD_FLAGS_FIRST_LOAD              = 0x8;
00128 
00150   [noscript]void internalLoad(in nsIURI aURI,
00151                               in nsIURI aReferrer,
00152                               in nsISupports aOwner,
00153                               in PRUint32 aFlags,
00154                               in wstring aWindowTarget,
00155                               in string aTypeHint,
00156                               in nsIInputStream aPostDataStream,
00157                               in nsIInputStream aHeadersStream,
00158                               in unsigned long aLoadFlags,
00159                               in nsISHEntry aSHEntry,
00160                               in boolean firstParty,
00161                               out nsIDocShell aDocShell,
00162                               out nsIRequest aRequest);
00163 
00168   void createLoadInfo(out nsIDocShellLoadInfo loadInfo);
00169 
00174   void prepareForNewContentModel();
00175 
00181   void setCurrentURI(in nsIURI aURI);
00182 
00188   [noscript] void firePageHideNotification(in boolean isUnload);
00189 
00193   [noscript] readonly attribute nsPresContext presContext;
00194 
00198   [noscript] readonly attribute nsIPresShell presShell;
00199 
00204   [noscript] readonly attribute nsIPresShell eldestPresShell;
00205 
00210   readonly attribute nsIContentViewer contentViewer;
00211 
00216   attribute nsIChromeEventHandler chromeEventHandler;
00217 
00222   attribute nsIDocumentCharsetInfo documentCharsetInfo;
00223 
00227   attribute boolean allowPlugins;
00228 
00232   attribute boolean allowJavascript;
00233 
00237   attribute  boolean allowMetaRedirects;
00238 
00242   attribute boolean allowSubframes;
00243 
00247   attribute boolean allowImages;
00248 
00258   const long ENUMERATE_FORWARDS  = 0;
00259   const long ENUMERATE_BACKWARDS = 1;
00260 
00261   nsISimpleEnumerator getDocShellEnumerator(in long aItemType,
00262                                             in long aDirection);
00263 
00267   const unsigned long APP_TYPE_UNKNOWN  = 0;
00268   const unsigned long APP_TYPE_MAIL     = 1;
00269   const unsigned long APP_TYPE_EDITOR   = 2;
00270 
00271   attribute unsigned long appType;
00272 
00278   attribute boolean allowAuth;
00279 
00288   attribute float zoom;
00289 
00290   /*
00291    * XXX Comment here!
00292    */
00293   attribute long marginWidth;
00294 
00295   /*
00296    * XXX Comment here!
00297    */
00298   attribute long marginHeight;
00299 
00300   /*
00301    * Tells the DocShell that it now has focus or has lost focus
00302    */
00303   attribute boolean hasFocus;
00304 
00305   /*
00306    * Tells the docshell whether the canvas should have focus
00307    */
00308   attribute boolean canvasHasFocus;
00309 
00310   /*
00311    * Tells the docshell to offer focus to its tree owner.
00312    * This is currently only necessary for embedding chrome.
00313    */
00314   void tabToTreeOwner(in boolean forward,
00315                       out boolean tookFocus);
00316 
00320   const unsigned long BUSY_FLAGS_NONE             = 0;
00321   const unsigned long BUSY_FLAGS_BUSY             = 1;
00322   const unsigned long BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
00323   const unsigned long BUSY_FLAGS_PAGE_LOADING     = 4;
00324 
00328   const unsigned long LOAD_CMD_NORMAL  = 0x1; // Normal load
00329   const unsigned long LOAD_CMD_RELOAD  = 0x2; // Reload
00330   const unsigned long LOAD_CMD_HISTORY = 0x4; // Load from history
00331 
00332   readonly attribute unsigned long busyFlags;
00333 
00334   /* 
00335    * attribute to access the loadtype  for the document
00336    */
00337   attribute unsigned long  loadType;
00338 
00339   /*
00340    * returns true if the docshell is being destroyed, false otherwise
00341    */
00342   boolean isBeingDestroyed();
00343 
00344   /*
00345    * Returns true if the docshell is currently executing the onLoad Handler
00346    */
00347   readonly attribute boolean isExecutingOnLoadHandler;
00348 
00349   attribute nsILayoutHistoryState layoutHistoryState;
00350 
00351   readonly attribute boolean shouldSaveLayoutState;
00352 
00357   attribute nsISecureBrowserUI securityUI;
00358 
00365   void suspendRefreshURIs();
00366 
00372   void resumeRefreshURIs();
00373 
00383   void beginRestore(in nsIContentViewer viewer, in boolean top);
00384 
00390   void finishRestore();
00391 
00392   /* Track whether we're currently restoring a document presentation. */
00393   readonly attribute boolean restoringDocument;
00394 
00395   /* attribute to access whether error pages are enabled */
00396   attribute boolean useErrorPages;
00397 
00403   readonly attribute long previousTransIndex;
00404   readonly attribute long loadedTransIndex;
00405 
00412   void historyPurged(in long numEntries);
00413 };
00414 
00415 [scriptable, uuid(45988A14-B240-4D07-AE64-50ECCA26E6D8)]
00416 interface nsIDocShell_MOZILLA_1_8_BRANCH : nsISupports
00417 {
00418   /*
00419    * Retrieves the WebApps session storage object for the supplied domain.
00420    * If it doesn't already exist, a new one will be created.
00421    *
00422    * @param domain the domain of the storage object to retrieve
00423    */
00424   nsIDOMStorage getSessionStorageForURI(in nsIURI uri);
00425 
00426   /*
00427    * Add a WebApps session storage object to the docshell.
00428    *
00429    * @param domain the domain the storage object is associated with
00430    * @param storage the storage object to add
00431    */
00432   void addSessionStorage(in ACString aDomain, in nsIDOMStorage storage);
00433 
00439   readonly attribute nsIChannel currentDocumentChannel;
00440 };
00441 
00442 [scriptable, uuid(9cee9ce9-a815-46ad-8d46-46b2044836b2)]
00443 interface nsIDocShell_MOZILLA_1_8_BRANCH2 : nsISupports
00444 {
00450   readonly attribute boolean isInUnload;
00451 };
00452 
00453 [scriptable, uuid(833fdff8-e0ca-4987-bf13-e10e631e504d)]
00454 interface nsIDocShell_MOZILLA_1_8_BRANCH3 : nsISupports
00455 {
00461   readonly attribute boolean channelIsUnsafe;
00462 };