Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
nsWebBrowser Class Reference

#include <nsWebBrowser.h>

Inheritance diagram for nsWebBrowser:
Inheritance graph
[legend]
Collaboration diagram for nsWebBrowser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsWebBrowser ()
void addWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID)
 Registers a listener of the type specified by the iid to receive callbacks.
void removeWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID)
 Removes a previously registered listener.
void goBack ()
 Tells the object to navigate to the previous session history item.
void goForward ()
 Tells the object to navigate to the next session history item.
void gotoIndex (in long index)
 Tells the object to navigate to the session history item at a given index.
void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders)
 Loads a given URI.
void reload (in unsigned long aReloadFlags)
 Tells the Object to reload the current page.
void stop (in unsigned long aStopFlags)
 Stops a load of a URI.
void setProperty (in unsigned long aId, in unsigned long aValue)
 Sets an integer or boolean property on the new web browser object.
boolean nameEquals (in wstring name)
 Compares the provided name against the item's name and returns the appropriate result.
nsIDocShellTreeItem findItemWithName (in wstring name, in nsISupports aRequestor, in nsIDocShellTreeItem aOriginalRequestor)
void setTreeOwner (in nsIDocShellTreeOwner treeOwner)
void initWindow (in nativeWindow parentNativeWindow, in nsIWidget parentWidget, in long x, in long y, in long cx, in long cy)
void create ()
void destroy ()
void setPosition (in long x, in long y)
void getPosition (out long x, out long y)
void setSize (in long cx, in long cy, in boolean fRepaint)
void getSize (out long cx, out long cy)
void setPositionAndSize (in long x, in long y, in long cx, in long cy, in boolean fRepaint)
void getPositionAndSize (out long x, out long y, out long cx, out long cy)
void repaint (in boolean force)
 Tell the window to repaint itself.
void setFocus ()
 Give the window focus.
long getCurScrollPos (in long scrollOrientation)
void setCurScrollPos (in long scrollOrientation, in long curPos)
void setCurScrollPosEx (in long curHorizontalPos, in long curVerticalPos)
void getScrollRange (in long scrollOrientation, out long minPos, out long maxPos)
void setScrollRange (in long scrollOrientation, in long minPos, in long maxPos)
void setScrollRangeEx (in long minHorizontalPos, in long maxHorizontalPos, in long minVerticalPos, in long maxVerticalPos)
long getDefaultScrollbarPreferences (in long scrollOrientation)
void setDefaultScrollbarPreferences (in long scrollOrientation, in long scrollbarPref)
void getScrollbarVisibility (out boolean verticalVisible, out boolean horizontalVisible)
void scrollByLines (in long numLines)
 Scroll the view up or down by aNumLines lines.
void scrollByPages (in long numPages)
 Scroll the view up or down by numPages pages.
void getInterface (in nsIIDRef uuid,[iid_is(uuid), retval] out nsQIResult result)
 Retrieves the specified interface pointer.
void saveURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile)
 Save the specified URI to file.
void saveChannel (in nsIChannel aChannel, in nsISupports aFile)
 Save a channel to a file.
void saveDocument (in nsIDOMDocument aDocument, in nsISupports aFile, in nsISupports aDataPath, in string aOutputContentType, in unsigned long aEncodingFlags, in unsigned long aWrapColumn)
 Save the specified DOM document to file and optionally all linked files (e.g.
void cancelSave ()
 Cancels the current operation.
void cancel (in nsresult aReason)
 Call this method to request that this object abort whatever operation it may be performing.
void activate ()
 MANDATORY activate() is a mandatory call that must be made to the browser when the embedding application's window is activated and the browser area was the last thing in focus.
void deactivate ()
 MANDATORY deactivate() is a mandatory call that must be made to the browser when the embedding application's window is deactivated and the browser area was the last thing in focus.
void setFocusAtFirstElement ()
 Give the first element focus within mozilla (i.e.
void setFocusAtLastElement ()
 Give the last element focus within mozilla (i.e.
void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus)
 Notification indicating the state has changed for one of the requests associated with aWebProgress.
void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress)
 Notification that the progress has changed for one of the requests associated with aWebProgress.
void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation)
 Called when the location of the window being watched changes.
void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage)
 Notification that the status of a request has changed.
void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aState)
 Notification called for security progress.
void openStream (in nsIURI aBaseURI, in ACString aContentType)
 Prepare to load a stream of data.
void appendToStream ([const, array, size_is(aLen)] in octet aData, in unsigned long aLen)
 Append data to this stream.
void closeStream ()
 Notifies the browser that all the data has been appended.

Public Attributes

attribute nsIWebBrowserChrome containerWindow
 The chrome object associated with the browser instance.
attribute nsIURIContentListener parentURIContentListener
 URI content listener parent.
readonly attribute nsIDOMWindow contentDOMWindow
 The top-level DOM window.
readonly attribute boolean canGoBack
 Indicates if the object can go back.
readonly attribute boolean canGoForward
 Indicates if the object can go forward.
const unsigned long LOAD_FLAGS_MASK = 0xffff
 This flags defines the range of bits that may be specified.
const unsigned long LOAD_FLAGS_NONE = 0x0000
 This is the default value for the load flags parameter.
const unsigned long LOAD_FLAGS_IS_REFRESH = 0x0010
 This flag specifies that the load should have the semantics of an HTML META refresh (i.e., that the cache should be validated).
const unsigned long LOAD_FLAGS_IS_LINK = 0x0020
 This flag specifies that the load should have the semantics of a link click.
const unsigned long LOAD_FLAGS_BYPASS_HISTORY = 0x0040
 This flag specifies that history should not be updated.
const unsigned long LOAD_FLAGS_REPLACE_HISTORY = 0x0080
 This flag specifies that any existing history entry should be replaced.
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100
 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_PROXY = 0x0200
 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_CHARSET_CHANGE = 0x0400
 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_STOP_CONTENT = 0x0800
 If this flag is set, Stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).
const unsigned long LOAD_FLAGS_FROM_EXTERNAL = 0x1000
 A hint this load was prompted by an external program: take care!
const unsigned long LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 0x2000
 This flag specifies that the URI may be submitted to a third-party server for correction.
const unsigned long LOAD_FLAGS_FIRST_LOAD = 0x4000
 This flag specifies that this is the first load in this object.
const unsigned long STOP_NETWORK = 0x01
 This flag specifies that all network activity should be stopped.
const unsigned long STOP_CONTENT = 0x02
 This flag specifies that all content activity should be stopped.
const unsigned long STOP_ALL = 0x03
 This flag specifies that all activity should be stopped.
readonly attribute nsIDOMDocument document
 Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none.
readonly attribute nsIURI currentURI
 The currently loaded URI or null.
readonly attribute nsIURI referringURI
 The referring URI for the currently loaded URI or null.
attribute nsISHistory sessionHistory
 The session history object used by this web navigation instance.
const unsigned long SETUP_ALLOW_PLUGINS = 1
 Boolean.
const unsigned long SETUP_ALLOW_JAVASCRIPT = 2
 Boolean.
const unsigned long SETUP_ALLOW_META_REDIRECTS = 3
 Boolean.
const unsigned long SETUP_ALLOW_SUBFRAMES = 4
 Boolean.
const unsigned long SETUP_ALLOW_IMAGES = 5
 Boolean.
const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6
 Boolean.
const unsigned long SETUP_USE_GLOBAL_HISTORY = 256
 Boolean.
const unsigned long SETUP_IS_CHROME_WRAPPER = 7
 Boolean.
attribute wstring name
const long typeChrome = 0
const long typeContent = 1
const long typeContentWrapper = 2
const long typeChromeWrapper = 3
const long typeAll = 0x7FFFFFFF
attribute long itemType
readonly attribute
nsIDocShellTreeItem 
parent
readonly attribute
nsIDocShellTreeItem 
sameTypeParent
readonly attribute
nsIDocShellTreeItem 
rootTreeItem
readonly attribute
nsIDocShellTreeItem 
sameTypeRootTreeItem
readonly attribute
nsIDocShellTreeOwner 
treeOwner
attribute long childOffset
attribute nsIWidget parentWidget
attribute nativeWindow parentNativeWindow
attribute boolean visibility
attribute boolean enabled
attribute boolean blurSuppression
 set blurSuppression to true to suppress handling of blur events.
readonly attribute nsIWidget mainWidget
attribute wstring title
const long ScrollOrientation_X = 1
const long ScrollOrientation_Y = 2
const long Scrollbar_Auto = 1
const long Scrollbar_Never = 2
const long Scrollbar_Always = 3
const unsigned long PERSIST_FLAGS_NONE = 0
 No special persistence behaviour.
const unsigned long PERSIST_FLAGS_FROM_CACHE = 1
 Only use cached data (could result in failure if data is not cached).
const unsigned long PERSIST_FLAGS_BYPASS_CACHE = 2
 Bypass the cached data.
const unsigned long PERSIST_FLAGS_IGNORE_REDIRECTED_DATA = 4
 Ignore any redirected data (usually adverts).
const unsigned long PERSIST_FLAGS_IGNORE_IFRAMES = 8
 Ignore IFRAME content (usually adverts).
const unsigned long PERSIST_FLAGS_NO_CONVERSION = 16
 Do not run the incoming data through a content converter e.g.
const unsigned long PERSIST_FLAGS_REPLACE_EXISTING_FILES = 32
 Replace existing files on the disk (use with due diligence!)
const unsigned long PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS = 64
 Don't modify or add base tags.
const unsigned long PERSIST_FLAGS_FIXUP_ORIGINAL_DOM = 128
 Make changes to original dom rather than cloning nodes.
const unsigned long PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION = 256
 Fix links relative to destination location (not origin)
const unsigned long PERSIST_FLAGS_DONT_FIXUP_LINKS = 512
 Don't make any adjustments to links.
const unsigned long PERSIST_FLAGS_SERIALIZE_OUTPUT = 1024
 Force serialization of output (one file at a time; not concurrent)
const unsigned long PERSIST_FLAGS_DONT_CHANGE_FILENAMES = 2048
 Don't make any adjustments to filenames.
const unsigned long PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS = 4096
 Fail on broken inline links.
const unsigned long PERSIST_FLAGS_CLEANUP_ON_FAILURE = 8192
 Automatically cleanup after a failed or cancelled operation, deleting all created files and directories.
const unsigned long PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION = 16384
 Let the WebBrowserPersist decide whether the incoming data is encoded and whether it needs to go through a content converter e.g.
attribute unsigned long persistFlags
 Flags governing how data is fetched and saved from the network.
const unsigned long PERSIST_STATE_READY = 1
 Persister is ready to save data.
const unsigned long PERSIST_STATE_SAVING = 2
 Persister is saving data.
const unsigned long PERSIST_STATE_FINISHED = 3
 Persister has finished saving data.
readonly attribute unsigned long currentState
 Current state of the persister object.
readonly attribute unsigned long result
 Value indicating the success or failure of the persist operation.
attribute nsIWebProgressListener progressListener
 Callback listener for progress notifications.
const unsigned long ENCODE_FLAGS_SELECTION_ONLY = 1
 Output only the current selection as opposed to the whole document.
const unsigned long ENCODE_FLAGS_FORMATTED = 2
 For plaintext output.
const unsigned long ENCODE_FLAGS_RAW = 4
 Output without formatting or wrapping the content.
const unsigned long ENCODE_FLAGS_BODY_ONLY = 8
 Output only the body section, no HTML tags.
const unsigned long ENCODE_FLAGS_PREFORMATTED = 16
 Wrap even if when not doing formatted output (e.g.
const unsigned long ENCODE_FLAGS_WRAP = 32
 Wrap documents at the specified column.
const unsigned long ENCODE_FLAGS_FORMAT_FLOWED = 64
 For plaintext output.
const unsigned long ENCODE_FLAGS_ABSOLUTE_LINKS = 128
 Convert links to absolute links where possible.
const unsigned long ENCODE_FLAGS_ENCODE_W3C_ENTITIES = 256
 Attempt to encode entities standardized at W3C (HTML, MathML, etc).
const unsigned long ENCODE_FLAGS_CR_LINEBREAKS = 512
 Output with carriage return line breaks.
const unsigned long ENCODE_FLAGS_LF_LINEBREAKS = 1024
 Output with linefeed line breaks.
const unsigned long ENCODE_FLAGS_NOSCRIPT_CONTENT = 2048
 For plaintext output.
const unsigned long ENCODE_FLAGS_NOFRAMES_CONTENT = 4096
 For plaintext output.
const unsigned long ENCODE_FLAGS_ENCODE_BASIC_ENTITIES = 8192
 Encode basic entities, e.g.
const unsigned long ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES = 16384
 Encode Latin1 entities.
const unsigned long ENCODE_FLAGS_ENCODE_HTML_ENTITIES = 32768
 Encode HTML4 entities.
attribute nsIDOMWindow focusedWindow
 The currently focused nsDOMWindow when the browser is active, or the last focused nsDOMWindow when the browser is inactive.
attribute nsIDOMElement focusedElement
 The currently focused nsDOMElement when the browser is active, or the last focused nsDOMElement when the browser is inactive.
const unsigned long STATE_START = 0x00000001
 State Transition Flags.
const unsigned long STATE_REDIRECTING = 0x00000002
const unsigned long STATE_TRANSFERRING = 0x00000004
const unsigned long STATE_NEGOTIATING = 0x00000008
const unsigned long STATE_STOP = 0x00000010
const unsigned long STATE_IS_REQUEST = 0x00010000
 State Type Flags.
const unsigned long STATE_IS_DOCUMENT = 0x00020000
const unsigned long STATE_IS_NETWORK = 0x00040000
const unsigned long STATE_IS_WINDOW = 0x00080000
const unsigned long STATE_RESTORING = 0x01000000
 State Modifier Flags.
const unsigned long STATE_IS_INSECURE = 0x00000004
 State Security Flags.
const unsigned long STATE_IS_BROKEN = 0x00000001
const unsigned long STATE_IS_SECURE = 0x00000002
const unsigned long STATE_SECURE_HIGH = 0x00040000
 Security Strength Flags.
const unsigned long STATE_SECURE_MED = 0x00010000
const unsigned long STATE_SECURE_LOW = 0x00020000

Protected Member Functions

virtual ~nsWebBrowser ()
NS_IMETHOD InternalDestroy ()
NS_IMETHOD SetDocShell (nsIDocShell *aDocShell)
NS_IMETHOD EnsureDocShellTreeOwner ()
NS_IMETHOD GetPrimaryContentWindow (nsIDOMWindowInternal **aDomWindow)
NS_IMETHOD BindListener (nsISupports *aListener, const nsIID &aIID)
NS_IMETHOD UnBindListener (nsISupports *aListener, const nsIID &aIID)
NS_IMETHOD EnableGlobalHistory (PRBool aEnable)

Static Protected Member Functions

static nsEventStatus PR_CALLBACK HandleEvent (nsGUIEvent *aEvent)

Protected Attributes

nsDocShellTreeOwnermDocShellTreeOwner
nsCOMPtr< nsIDocShellmDocShell
nsCOMPtr< nsIInterfaceRequestormDocShellAsReq
nsCOMPtr< nsIBaseWindowmDocShellAsWin
nsCOMPtr< nsIDocShellTreeItemmDocShellAsItem
nsCOMPtr< nsIWebNavigationmDocShellAsNav
nsCOMPtr< nsIScrollablemDocShellAsScrollable
nsCOMPtr< nsITextScrollmDocShellAsTextScroll
nsCOMPtr< nsIWidgetmInternalWidget
nsCOMPtr< nsIWindowWatchermWWatch
nsWebBrowserInitInfomInitInfo
PRUint32 mContentType
PRBool mActivating
nativeWindow mParentNativeWindow
nsIWebProgressListenermProgressListener
nsCOMPtr< nsIWebProgressmWebProgress
nsCOMPtr< nsIPrintSettingsmPrintSettings
nscolor mBackgroundColor
nsCOMPtr< nsIWebBrowserPersistmPersist
PRUint32 mPersistCurrentState
PRUint32 mPersistResult
PRUint32 mPersistFlags
nsEmbedStreammStream
nsCOMPtr< nsISupports > mStreamGuard
nsIWidgetmParentWidget
nsVoidArraymListenerArray

Friends

class nsDocShellTreeOwner

Detailed Description

Definition at line 107 of file nsWebBrowser.h.


Constructor & Destructor Documentation

nsWebBrowser::~nsWebBrowser ( ) [protected, virtual]

Definition at line 125 of file nsWebBrowser.cpp.

Here is the call graph for this function:


Member Function Documentation

MANDATORY activate() is a mandatory call that must be made to the browser when the embedding application's window is activated and the browser area was the last thing in focus.

This method can also be called if the embedding application wishes to give the browser area focus, without affecting the currently focused element within the browser.

Note:
If you fail to make this call, mozilla focus memory will not work correctly.
void nsIWebBrowser::addWebBrowserListener ( in nsIWeakReference  aListener,
in nsIIDRef  aIID 
) [inherited]

Registers a listener of the type specified by the iid to receive callbacks.

The browser stores a weak reference to the listener to avoid any circular dependencies. Typically this method will be called to register an object to receive nsIWebProgressListener or nsISHistoryListener notifications in which case the the IID is that of the interface.

Parameters:
aListenerThe listener to be added.
aIIDThe IID of the interface that will be called on the listener as appropriate.
Returns:
NS_OK for successful registration; NS_ERROR_INVALID_ARG if aIID is not supposed to be registered using this method; NS_ERROR_FAILURE either aListener did not expose the interface specified by the IID, or some other internal error occurred.
See also:
removeWebBrowserListener
nsIWeakReference
nsIWebProgressListener
nsISHistoryListener
Returns:
NS_OK, listener was successfully added; NS_ERROR_INVALID_ARG, one of the arguments was invalid or the object did not implement the interface specified by the IID.
void nsIWebBrowserStream::appendToStream ( [const, array, size_is(aLen)] in octet  aData,
in unsigned long  aLen 
) [inherited]

Append data to this stream.

Parameters:
aDataThe data to append
aLenLength of the data to append.
Note:
To append more than 4 GB of data, call this method multiple times.
NS_IMETHODIMP nsWebBrowser::BindListener ( nsISupports *  aListener,
const nsIID aIID 
) [protected]

Definition at line 273 of file nsWebBrowser.cpp.

                                                                                  {
    NS_ASSERTION(aListener, "invalid args");
    NS_ASSERTION(mWebProgress, "this should only be called after we've retrieved a progress iface");
    nsresult rv = NS_OK;

    // register this listener for the specified interface id
    if (aIID.Equals(NS_GET_IID(nsIWebProgressListener))) {
        nsCOMPtr<nsIWebProgressListener> listener = do_QueryInterface(aListener, &rv);
        if (NS_FAILED(rv)) return rv;
        rv = mWebProgress->AddProgressListener(listener, nsIWebProgress::NOTIFY_ALL);
    }
    else if (aIID.Equals(NS_GET_IID(nsISHistoryListener))) {      
      nsCOMPtr<nsISHistory> shistory(do_GetInterface(mDocShell, &rv));
      if (NS_FAILED(rv)) return rv;
      nsCOMPtr<nsISHistoryListener> listener(do_QueryInterface(aListener, &rv));
      if (NS_FAILED(rv)) return rv;
      rv = shistory->AddSHistoryListener(listener);
    }
    return rv;
}

Here is the call graph for this function:

void nsICancelable::cancel ( in nsresult  aReason) [inherited]

Call this method to request that this object abort whatever operation it may be performing.

Parameters:
aReasonPass a failure code to indicate the reason why this operation is being canceled. It is an error to pass a success code.

Cancels the current operation.

The caller is responsible for cleaning up partially written files or directories. This has the same effect as calling cancel with an argument of NS_BINDING_ABORTED.

Notifies the browser that all the data has been appended.

This may notify the user that the browser is "done loading" in some form.

Exceptions:
NS_ERROR_UNEXPECTEDThis method was called without a preceding openStream.
void nsIBaseWindow::create ( ) [inherited]

MANDATORY deactivate() is a mandatory call that must be made to the browser when the embedding application's window is deactivated and the browser area was the last thing in focus.

On non-windows platforms, deactivate() should also be called when focus moves from the browser to the embedding chrome.

Note:
If you fail to make this call, mozilla focus memory will not work correctly.
void nsIBaseWindow::destroy ( ) [inherited]

Definition at line 355 of file nsWebBrowser.cpp.

{
    nsresult rv;
    
    NS_ENSURE_STATE(mDocShell);
    nsCOMPtr<nsIDocShellHistory> dsHistory(do_QueryInterface(mDocShell, &rv));
    if (NS_FAILED(rv)) return rv;
    
    if (aEnable) {
        rv = dsHistory->SetUseGlobalHistory(PR_TRUE);
    }
    else {
        rv = dsHistory->SetUseGlobalHistory(PR_FALSE);
    }
       
    return rv;
}

Here is the call graph for this function:

Definition at line 1653 of file nsWebBrowser.cpp.

Here is the call graph for this function:

nsIDocShellTreeItem nsIDocShellTreeItem::findItemWithName ( in wstring  name,
in nsISupports  aRequestor,
in nsIDocShellTreeItem  aOriginalRequestor 
) [inherited]
long nsIScrollable::getCurScrollPos ( in long  scrollOrientation) [inherited]
long nsIScrollable::getDefaultScrollbarPreferences ( in long  scrollOrientation) [inherited]
void nsIInterfaceRequestor::getInterface ( in nsIIDRef  uuid,
[iid_is(uuid), retval] out nsQIResult  result 
) [inherited]

Retrieves the specified interface pointer.

Parameters:
uuidThe IID of the interface being requested.
result[out] The interface pointer to be filled in if the interface is accessible.
Returns:
NS_OK - interface was successfully returned. NS_NOINTERFACE - interface not accessible. NS_ERROR* - method failure.
void nsIBaseWindow::getPosition ( out long  x,
out long  y 
) [inherited]
void nsIBaseWindow::getPositionAndSize ( out long  x,
out long  y,
out long  cx,
out long  cy 
) [inherited]

Definition at line 1721 of file nsWebBrowser.cpp.

{
  *aDOMWindow = 0;

  nsCOMPtr<nsIDocShellTreeItem> item;
  NS_ENSURE_TRUE(mDocShellTreeOwner, NS_ERROR_FAILURE);
  mDocShellTreeOwner->GetPrimaryContentShell(getter_AddRefs(item));
  NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);

  nsCOMPtr<nsIDocShell> docShell;
  docShell = do_QueryInterface(item);
  NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
  
  nsCOMPtr<nsIDOMWindowInternal> domWindow;
  domWindow = do_GetInterface(docShell);
  NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);

  *aDOMWindow = domWindow;
  NS_ADDREF(*aDOMWindow);
  return NS_OK;
  
}

Here is the call graph for this function:

void nsIScrollable::getScrollbarVisibility ( out boolean  verticalVisible,
out boolean  horizontalVisible 
) [inherited]
void nsIScrollable::getScrollRange ( in long  scrollOrientation,
out long  minPos,
out long  maxPos 
) [inherited]
void nsIBaseWindow::getSize ( out long  cx,
out long  cy 
) [inherited]
void nsIWebNavigation::goBack ( ) [inherited]

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.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that canGoBack is false.

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.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that canGoForward is false.
void nsIWebNavigation::gotoIndex ( in long  index) [inherited]

Tells the object to navigate to the session history item at a given index.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that session history entry at the given index does not exist.

Definition at line 1668 of file nsWebBrowser.cpp.

{
  nsEventStatus  result = nsEventStatus_eIgnore;
  nsWebBrowser  *browser = nsnull;
  void          *data = nsnull;

  if (!aEvent->widget)
    return result;

  aEvent->widget->GetClientData(data);
  if (!data)
    return result;

  browser = NS_STATIC_CAST(nsWebBrowser *, data);

  switch(aEvent->message) {

  case NS_PAINT: {
      nsPaintEvent *paintEvent = NS_STATIC_CAST(nsPaintEvent *, aEvent);
      nsIRenderingContext *rc = paintEvent->renderingContext;
      nscolor oldColor;
      rc->GetColor(oldColor);
      rc->SetColor(browser->mBackgroundColor);

      nsIRegion *region = paintEvent->region;
      if (region) {
          nsRegionRectSet *rects = nsnull;
          region->GetRects(&rects);
          if (rects) {
              for (PRUint32 i = 0; i < rects->mNumRects; ++i) {
                  nsRect r(rects->mRects[i].x, rects->mRects[i].y,
                           rects->mRects[i].width, rects->mRects[i].height);
                  rc->FillRect(r);
              }

              region->FreeRects(rects);
          }
      } else if (paintEvent->rect) {
          rc->FillRect(*paintEvent->rect);
      }
      rc->SetColor(oldColor);
      break;
    }

  default:
    break;
  }

  return result;
    
  
}

Here is the call graph for this function:

void nsIBaseWindow::initWindow ( in nativeWindow  parentNativeWindow,
in nsIWidget  parentWidget,
in long  x,
in long  y,
in long  cx,
in long  cy 
) [inherited]

Definition at line 136 of file nsWebBrowser.cpp.

{

  if (mInternalWidget)
    mInternalWidget->SetClientData(0);

   SetDocShell(nsnull);

   if(mDocShellTreeOwner)
      {
      mDocShellTreeOwner->WebBrowser(nsnull);
      NS_RELEASE(mDocShellTreeOwner);
      }
   if(mInitInfo)
      {
      delete mInitInfo;
      mInitInfo = nsnull;
      }

   if (mListenerArray) {
      (void)mListenerArray->EnumerateForwards(deleteListener, nsnull);
      delete mListenerArray;
      mListenerArray = nsnull;
   }

#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)   
   NS_IF_RELEASE(mTopLevelWidget);
#endif

   return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIWebNavigation::loadURI ( in wstring  aURI,
in unsigned long  aLoadFlags,
in nsIURI  aReferrer,
in nsIInputStream  aPostData,
in nsIInputStream  aHeaders 
) [inherited]

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 URI dispatcher will go through its normal process of content loading.

Parameters:
aURIThe 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.
aLoadFlagsFlags 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.
aReferrerThe referring URI. If this argument is null, then the referring URI will be inferred internally.
aPostDataIf 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.
aHeadersIf 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.
boolean nsIDocShellTreeItem::nameEquals ( in wstring  name) [inherited]

Compares the provided name against the item's name and returns the appropriate result.

Returns:
PR_TRUE if names match; PR_FALSE otherwise.
void nsIWebProgressListener::onLocationChange ( in nsIWebProgress  aWebProgress,
in nsIRequest  aRequest,
in nsIURI  aLocation 
) [inherited]

Called when the location of the window being watched changes.

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 that we are loading this new page here.

Parameters:
aWebProgressThe nsIWebProgress instance that fired the notification.
aRequestThe associated nsIRequest. This may be null in some cases.
aLocationThe URI of the location that is being loaded.
void nsIWebProgressListener::onProgressChange ( in nsIWebProgress  aWebProgress,
in nsIRequest  aRequest,
in long  aCurSelfProgress,
in long  aMaxSelfProgress,
in long  aCurTotalProgress,
in long  aMaxTotalProgress 
) [inherited]

Notification that the progress has changed for one of the requests associated with aWebProgress.

Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onStateChange being called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW flags).

Parameters:
aWebProgressThe nsIWebProgress instance that fired the notification.
aRequestThe nsIRequest that has new progress.
aCurSelfProgressThe current progress for aRequest.
aMaxSelfProgressThe maximum progress for aRequest.
aCurTotalProgressThe current progress for all requests associated with aWebProgress.
aMaxTotalProgressThe total progress for all requests associated with aWebProgress.

NOTE: If any progress value is unknown, or if its value would exceed the maximum value of type long, then its value is replaced with -1.

NOTE: If the object also implements nsIWebProgressListener2 and the caller knows about that interface, this function will not be called. Instead, nsIWebProgressListener2::onProgressChange64 will be called.

void nsIWebProgressListener::onSecurityChange ( in nsIWebProgress  aWebProgress,
in nsIRequest  aRequest,
in unsigned long  aState 
) [inherited]

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.

Parameters:
aWebProgressThe nsIWebProgress instance that fired the notification.
aRequestThe nsIRequest that has new security state.
aStateA value composed of the Security State Flags and the Security Strength Flags listed above. Any undefined bits are reserved for future use.

NOTE: These notifications will only occur if a security package is installed.

void nsIWebProgressListener::onStateChange ( in nsIWebProgress  aWebProgress,
in nsIRequest  aRequest,
in unsigned long  aStateFlags,
in nsresult  aStatus 
) [inherited]

Notification indicating the state has changed for one of the requests associated with aWebProgress.

Parameters:
aWebProgressThe nsIWebProgress instance that fired the notification
aRequestThe nsIRequest that has changed state.
aStateFlagsFlags indicating the new state. This value is a combination of one of the State Transition Flags and one or more of the State Type Flags defined above. Any undefined bits are reserved for future use.
aStatusError status code associated with the state change. This parameter should be ignored unless aStateFlags includes the STATE_STOP bit. The status code indicates success or failure of the request associated with the state change. NOTE: aStatus may be a success code even for server generated errors, such as the HTTP 404 error. In such cases, the request itself should be queried for extended error information (e.g., for HTTP requests see nsIHttpChannel).
void nsIWebProgressListener::onStatusChange ( in nsIWebProgress  aWebProgress,
in nsIRequest  aRequest,
in nsresult  aStatus,
in wstring  aMessage 
) [inherited]

Notification that the status of a request has changed.

The status message is intended to be displayed to the user (e.g., in the status bar of the browser).

Parameters:
aWebProgressThe nsIWebProgress instance that fired the notification.
aRequestThe nsIRequest that has new status.
aStatusThis value is not an error code. Instead, it is a numeric value that indicates the current status of the request. This interface does not define the set of possible status codes. NOTE: Some status values are defined by nsITransport and nsISocketTransport.
aMessageLocalized text corresponding to aStatus.
void nsIWebBrowserStream::openStream ( in nsIURI  aBaseURI,
in ACString  aContentType 
) [inherited]

Prepare to load a stream of data.

When this function returns successfully, it must be paired by a call to closeStream.

Parameters:
aBaseURIThe base URI of the data. Must not be null. Relative URIs will be resolved relative to this URI.
aContentTypeASCII string giving the content type of the data. If rendering content of this type is not supported, this method fails. This string may include a charset declaration, for example: text/html;charset=ISO-8859-1
Exceptions:
NS_ERROR_NOT_AVAILABLEThe requested content type is not supported.
NS_ERROR_IN_PROGRESSopenStream was called twice without an intermediate closeStream.
void nsIWebNavigation::reload ( in unsigned long  aReloadFlags) [inherited]

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).

Parameters:
aReloadFlagsFlags 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.
Exceptions:
NS_BINDING_ABORTEDIndicating that the user canceled the reload.
void nsIWebBrowser::removeWebBrowserListener ( in nsIWeakReference  aListener,
in nsIIDRef  aIID 
) [inherited]

Removes a previously registered listener.

Parameters:
aListenerThe listener to be removed.
aIIDThe IID of the interface on the listener that will no longer be called.
Returns:
NS_OK, listener was successfully removed; NS_ERROR_INVALID_ARG arguments was invalid or the object did not implement the interface specified by the IID.
See also:
addWebBrowserListener
nsIWeakReference
void nsIBaseWindow::repaint ( in boolean  force) [inherited]

Tell the window to repaint itself.

Parameters:
aForce- if true, repaint immediately if false, the window may defer repainting as it sees fit.
void nsIWebBrowserPersist::saveChannel ( in nsIChannel  aChannel,
in nsISupports  aFile 
) [inherited]

Save a channel to a file.

It must not be opened yet.

See also:
saveURI
void nsIWebBrowserPersist::saveDocument ( in nsIDOMDocument  aDocument,
in nsISupports  aFile,
in nsISupports  aDataPath,
in string  aOutputContentType,
in unsigned long  aEncodingFlags,
in unsigned long  aWrapColumn 
) [inherited]

Save the specified DOM document to file and optionally all linked files (e.g.

images, CSS, JS & subframes). Do not call this method until the document has finished loading!

Parameters:
aDocumentDocument to save to file. Some implementations of this interface may also support nsnull to imply the currently loaded document.
aFileTarget local file. This may be a nsILocalFile object or an nsIURI object with a file scheme or a scheme that supports uploading (e.g. ftp).
aDataPathPath to directory where URIs linked to the document are saved or nsnull if no linked URIs should be saved. This may be a nsILocalFile object or an nsIURI object with a file scheme.
aOutputContentTypeThe desired MIME type format to save the document and all subdocuments into or nsnull to use the default behaviour.
aEncodingFlagsFlags to pass to the encoder.
aWrapColumnFor text documents, indicates the desired width to wrap text at. Parameter is ignored if wrapping is not specified by the encoding flags.
See also:
nsILocalFile
nsIURI
Returns:
NS_OK Operation has been started.
NS_ERROR_INVALID_ARG One or more arguments was invalid.
void nsIWebBrowserPersist::saveURI ( in nsIURI  aURI,
in nsISupports  aCacheKey,
in nsIURI  aReferrer,
in nsIInputStream  aPostData,
in string  aExtraHeaders,
in nsISupports  aFile 
) [inherited]

Save the specified URI to file.

Parameters:
aURIURI to save to file. Some implementations of this interface may also support nsnull to imply the currently loaded URI.
aCacheKeyAn object representing the URI in the cache or nsnull.
aReferrerThe referrer URI to pass with an HTTP request or nsnull.
aPostDataPost data to pass with an HTTP request or nsnull.
aExtraHeadersAdditional headers to supply with an HTTP request or nsnull.
aFileTarget file. This may be a nsILocalFile object or an nsIURI object with a file scheme or a scheme that supports uploading (e.g. ftp).
See also:
nsILocalFile
nsIURI
nsIInputStream
Returns:
NS_OK Operation has been started.
NS_ERROR_INVALID_ARG One or more arguments was invalid.
void nsITextScroll::scrollByLines ( in long  numLines) [inherited]

Scroll the view up or down by aNumLines lines.

positive values move down in the view. Prevents scrolling off the end of the view.

Parameters:
numLinesnumber of lines to scroll the view by
void nsITextScroll::scrollByPages ( in long  numPages) [inherited]

Scroll the view up or down by numPages pages.

a page is considered to be the amount displayed by the clip view. positive values move down in the view. Prevents scrolling off the end of the view.

Parameters:
numPagesnumber of pages to scroll the view by
void nsIScrollable::setCurScrollPos ( in long  scrollOrientation,
in long  curPos 
) [inherited]
void nsIScrollable::setCurScrollPosEx ( in long  curHorizontalPos,
in long  curVerticalPos 
) [inherited]
void nsIScrollable::setDefaultScrollbarPreferences ( in long  scrollOrientation,
in long  scrollbarPref 
) [inherited]
NS_IMETHODIMP nsWebBrowser::SetDocShell ( nsIDocShell aDocShell) [protected]

Definition at line 1608 of file nsWebBrowser.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIBaseWindow::setFocus ( ) [inherited]

Give the window focus.

Give the first element focus within mozilla (i.e.

TAB was pressed and focus should enter mozilla)

Give the last element focus within mozilla (i.e.

SHIFT-TAB was pressed and focus should enter mozilla)

void nsIBaseWindow::setPosition ( in long  x,
in long  y 
) [inherited]
void nsIBaseWindow::setPositionAndSize ( in long  x,
in long  y,
in long  cx,
in long  cy,
in boolean  fRepaint 
) [inherited]
void nsIWebBrowserSetup::setProperty ( in unsigned long  aId,
in unsigned long  aValue 
) [inherited]

Sets an integer or boolean property on the new web browser object.

Only PR_TRUE and PR_FALSE are legal boolean values.

Parameters:
aIdThe identifier of the property to be set.
aValueThe value of the property.
void nsIScrollable::setScrollRange ( in long  scrollOrientation,
in long  minPos,
in long  maxPos 
) [inherited]
void nsIScrollable::setScrollRangeEx ( in long  minHorizontalPos,
in long  maxHorizontalPos,
in long  minVerticalPos,
in long  maxVerticalPos 
) [inherited]
void nsIBaseWindow::setSize ( in long  cx,
in long  cy,
in boolean  fRepaint 
) [inherited]
void nsIWebNavigation::stop ( in unsigned long  aStopFlags) [inherited]

Stops a load of a URI.

Parameters:
aStopFlagsThis parameter is one of the stop flags defined above.
NS_IMETHODIMP nsWebBrowser::UnBindListener ( nsISupports *  aListener,
const nsIID aIID 
) [protected]

Definition at line 334 of file nsWebBrowser.cpp.

                                                                                    {
    NS_ASSERTION(aListener, "invalid args");
    NS_ASSERTION(mWebProgress, "this should only be called after we've retrieved a progress iface");
    nsresult rv = NS_OK;

    // remove the listener for the specified interface id
    if (aIID.Equals(NS_GET_IID(nsIWebProgressListener))) {
        nsCOMPtr<nsIWebProgressListener> listener = do_QueryInterface(aListener, &rv);
        if (NS_FAILED(rv)) return rv;
        rv = mWebProgress->RemoveProgressListener(listener);
    }
    else if (aIID.Equals(NS_GET_IID(nsISHistoryListener))) {
      nsCOMPtr<nsISHistory> shistory(do_GetInterface(mDocShell, &rv));
      if (NS_FAILED(rv)) return rv;
      nsCOMPtr<nsISHistoryListener> listener(do_QueryInterface(aListener, &rv));
      if (NS_FAILED(rv)) return rv;
      rv = shistory->RemoveSHistoryListener(listener);
    }
    return rv;
}

Here is the call graph for this function:


Friends And Related Function Documentation

friend class nsDocShellTreeOwner [friend]

Definition at line 121 of file nsWebBrowser.h.


Member Data Documentation

set blurSuppression to true to suppress handling of blur events.

set it false to re-enable them. query it to determine whether blur events are suppressed. The implementation should allow for blur events to be suppressed multiple times.

Definition at line 205 of file nsIBaseWindow.idl.

Indicates if the object can go back.

If true this indicates that there is back session history available for navigation.

Definition at line 62 of file nsIWebNavigation.idl.

Indicates if the object can go forward.

If true this indicates that there is forward session history available for navigation

Definition at line 68 of file nsIWebNavigation.idl.

Definition at line 162 of file nsIDocShellTreeItem.idl.

The chrome object associated with the browser instance.

The embedder must create one chrome object for each browser object that is instantiated. The embedder must associate the two by setting this property to point to the chrome object before creating the browser window via the browser's nsIBaseWindow interface.

The chrome object must also implement nsIEmbeddingSiteWindow.

The chrome may optionally implement nsIInterfaceRequestor, nsIWebBrowserChromeFocus, nsIContextMenuListener and nsITooltipListener to receive additional notifications from the browser object.

The chrome object may optionally implement nsIWebProgressListener instead of explicitly calling addWebBrowserListener and removeWebBrowserListener to register a progress listener object. If the implementation does this, it must also implement nsIWeakReference.

Note:
The implementation should not refcount the supplied chrome object; it should assume that a non nsnull value is always valid. The embedder must explicitly set this value back to nsnull if the chrome object is destroyed before the browser object.
See also:
nsIBaseWindow
nsIWebBrowserChrome
nsIEmbeddingSiteWindow
nsIInterfaceRequestor
nsIWebBrowserChromeFocus
nsIContextMenuListener
nsITooltipListener
nsIWeakReference
nsIWebProgressListener

Definition at line 144 of file nsIWebBrowser.idl.

The top-level DOM window.

The embedder may walk the entire DOM starting from this value.

See also:
nsIDOMWindow

Definition at line 169 of file nsIWebBrowser.idl.

readonly attribute unsigned long nsIWebBrowserPersist::currentState [inherited]

Current state of the persister object.

Definition at line 116 of file nsIWebBrowserPersist.idl.

The currently loaded URI or null.

Definition at line 286 of file nsIWebNavigation.idl.

Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none.

This attribute never returns null except for unexpected error situations.

Definition at line 281 of file nsIWebNavigation.idl.

Definition at line 198 of file nsIBaseWindow.idl.

Convert links to absolute links where possible.

Definition at line 201 of file nsIWebBrowserPersist.idl.

Output only the body section, no HTML tags.

Definition at line 188 of file nsIWebBrowserPersist.idl.

Output with carriage return line breaks.

May also be combined with ENCODE_FLAGS_LF_LINEBREAKS and if neither is specified, the platform default format is used.

Definition at line 216 of file nsIWebBrowserPersist.idl.

Encode basic entities, e.g.

output   instead of character code 0xa0. The basic set is just   & < > " for interoperability with older products that don't support and friends.

Definition at line 233 of file nsIWebBrowserPersist.idl.

Encode HTML4 entities.

This includes the basic set, accented letters, greek letters and certain special markup symbols.

Definition at line 243 of file nsIWebBrowserPersist.idl.

Encode Latin1 entities.

This includes the basic set and accented letters between 128 and 255.

Definition at line 238 of file nsIWebBrowserPersist.idl.

Attempt to encode entities standardized at W3C (HTML, MathML, etc).

This is a catch-all flag for documents with mixed contents. Beware of interoperability issues. See below for other flags which might likely do what you want.

Definition at line 209 of file nsIWebBrowserPersist.idl.

For plaintext output.

Output for format flowed (RFC 2646). This is used when converting to text for mail sending. This differs just slightly but in an important way from normal formatted, and that is that lines are space stuffed. This can't (correctly) be done later.

Definition at line 199 of file nsIWebBrowserPersist.idl.

For plaintext output.

Convert html to plaintext that looks like the html. Implies wrap (except inside <pre>), since html wraps. HTML output: always do prettyprinting, ignoring existing formatting.

Definition at line 181 of file nsIWebBrowserPersist.idl.

Output with linefeed line breaks.

May also be combined with ENCODE_FLAGS_CR_LINEBREAKS and if neither is specified, the platform default format is used.

Definition at line 222 of file nsIWebBrowserPersist.idl.

For plaintext output.

Output the content of noframes elements.

Definition at line 226 of file nsIWebBrowserPersist.idl.

For plaintext output.

Output the content of noscript elements.

Definition at line 224 of file nsIWebBrowserPersist.idl.

Wrap even if when not doing formatted output (e.g.

for text fields).

Definition at line 190 of file nsIWebBrowserPersist.idl.

Output without formatting or wrapping the content.

This flag may be used to preserve the original formatting as much as possible.

Definition at line 186 of file nsIWebBrowserPersist.idl.

Output only the current selection as opposed to the whole document.

Definition at line 175 of file nsIWebBrowserPersist.idl.

Wrap documents at the specified column.

Definition at line 192 of file nsIWebBrowserPersist.idl.

The currently focused nsDOMElement when the browser is active, or the last focused nsDOMElement when the browser is inactive.

Definition at line 111 of file nsIWebBrowserFocus.idl.

The currently focused nsDOMWindow when the browser is active, or the last focused nsDOMWindow when the browser is inactive.

Definition at line 105 of file nsIWebBrowserFocus.idl.

Definition at line 81 of file nsIDocShellTreeItem.idl.

This flag specifies that the URI may be submitted to a third-party server for correction.

This should only be applied to non-sensitive URIs entered by users.

Definition at line 183 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE = 0x0100 [inherited]

This flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load.

Definition at line 150 of file nsIWebNavigation.idl.

This flag specifies that history should not be updated.

This flag is only applicable to loadURI.

Definition at line 138 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY = 0x0200 [inherited]

This flag specifies that any intermediate proxy caches should be bypassed (i.e., that the content should be loaded from the origin server).

Definition at line 156 of file nsIWebNavigation.idl.

This flag specifies that a reload was triggered as a result of detecting an incorrect character encoding while parsing a previously loaded document.

Definition at line 163 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_FIRST_LOAD = 0x4000 [inherited]

This flag specifies that this is the first load in this object.

Set with care, since setting incorrectly can cause us to assume that nothing was actually loaded in this object if the load ends up being handled by an external application.

Definition at line 191 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_FROM_EXTERNAL = 0x1000 [inherited]

A hint this load was prompted by an external program: take care!

Definition at line 176 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_IS_LINK = 0x0020 [inherited]

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.

Definition at line 132 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_IS_REFRESH = 0x0010 [inherited]

This flag specifies that the load should have the semantics of an HTML META refresh (i.e., that the cache should be validated).

This flag is only applicable to loadURI. XXX the meaning of this flag is poorly defined.

Definition at line 125 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_MASK = 0xffff [inherited]

This flags defines the range of bits that may be specified.

Definition at line 112 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_NONE = 0x0000 [inherited]

This is the default value for the load flags parameter.

Definition at line 117 of file nsIWebNavigation.idl.

This flag specifies that any existing history entry should be replaced.

This flag is only applicable to loadURI.

Definition at line 144 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::LOAD_FLAGS_STOP_CONTENT = 0x0800 [inherited]

If this flag is set, Stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).

Effectively, this passes the STOP_CONTENT flag to Stop(), in addition to the STOP_NETWORK flag.

Definition at line 171 of file nsIWebNavigation.idl.

Definition at line 167 of file nsWebBrowser.h.

Definition at line 212 of file nsIBaseWindow.idl.

Definition at line 175 of file nsWebBrowser.h.

Definition at line 166 of file nsWebBrowser.h.

Definition at line 156 of file nsWebBrowser.h.

Definition at line 159 of file nsWebBrowser.h.

Definition at line 160 of file nsWebBrowser.h.

Definition at line 157 of file nsWebBrowser.h.

Definition at line 161 of file nsWebBrowser.h.

Definition at line 162 of file nsWebBrowser.h.

Definition at line 158 of file nsWebBrowser.h.

Definition at line 155 of file nsWebBrowser.h.

Definition at line 165 of file nsWebBrowser.h.

Definition at line 163 of file nsWebBrowser.h.

Definition at line 189 of file nsWebBrowser.h.

Definition at line 168 of file nsWebBrowser.h.

Definition at line 188 of file nsWebBrowser.h.

Definition at line 178 of file nsWebBrowser.h.

Definition at line 179 of file nsWebBrowser.h.

Definition at line 181 of file nsWebBrowser.h.

Definition at line 180 of file nsWebBrowser.h.

Definition at line 172 of file nsWebBrowser.h.

Definition at line 169 of file nsWebBrowser.h.

Definition at line 184 of file nsWebBrowser.h.

nsCOMPtr<nsISupports> nsWebBrowser::mStreamGuard [protected]

Definition at line 185 of file nsWebBrowser.h.

Definition at line 170 of file nsWebBrowser.h.

Definition at line 164 of file nsWebBrowser.h.

attribute wstring nsIDocShellTreeItem::name [inherited]

Definition at line 57 of file nsIDocShellTreeItem.idl.

Definition at line 86 of file nsIDocShellTreeItem.idl.

Definition at line 185 of file nsIBaseWindow.idl.

URI content listener parent.

The embedder may set this property to their own implementation if they intend to override or prevent how certain kinds of content are loaded.

Note:
If this attribute is set to an object that implements nsISupportsWeakReference, the implementation should get the nsIWeakReference and hold that. Otherwise, the implementation should not refcount this interface; it should assume that a non null value is always valid. In that case, the embedder should explicitly set this value back to null if the parent content listener is destroyed before the browser object.
See also:
nsIURIContentListener

Definition at line 161 of file nsIWebBrowser.idl.

Definition at line 174 of file nsIBaseWindow.idl.

Let the WebBrowserPersist decide whether the incoming data is encoded and whether it needs to go through a content converter e.g.

to decompress it.

Definition at line 96 of file nsIWebBrowserPersist.idl.

Bypass the cached data.

Definition at line 62 of file nsIWebBrowserPersist.idl.

Automatically cleanup after a failed or cancelled operation, deleting all created files and directories.

This flag does nothing for failed upload operations to remote servers.

Definition at line 90 of file nsIWebBrowserPersist.idl.

Don't make any adjustments to filenames.

Definition at line 82 of file nsIWebBrowserPersist.idl.

Don't make any adjustments to links.

Definition at line 78 of file nsIWebBrowserPersist.idl.

Fail on broken inline links.

Definition at line 84 of file nsIWebBrowserPersist.idl.

Fix links relative to destination location (not origin)

Definition at line 76 of file nsIWebBrowserPersist.idl.

Make changes to original dom rather than cloning nodes.

Definition at line 74 of file nsIWebBrowserPersist.idl.

Only use cached data (could result in failure if data is not cached).

Definition at line 60 of file nsIWebBrowserPersist.idl.

Ignore IFRAME content (usually adverts).

Definition at line 66 of file nsIWebBrowserPersist.idl.

Ignore any redirected data (usually adverts).

Definition at line 64 of file nsIWebBrowserPersist.idl.

Don't modify or add base tags.

Definition at line 72 of file nsIWebBrowserPersist.idl.

Do not run the incoming data through a content converter e.g.

to decompress it

Definition at line 68 of file nsIWebBrowserPersist.idl.

No special persistence behaviour.

Definition at line 58 of file nsIWebBrowserPersist.idl.

Replace existing files on the disk (use with due diligence!)

Definition at line 70 of file nsIWebBrowserPersist.idl.

Force serialization of output (one file at a time; not concurrent)

Definition at line 80 of file nsIWebBrowserPersist.idl.

Persister has finished saving data.

Definition at line 111 of file nsIWebBrowserPersist.idl.

Persister is ready to save data.

Definition at line 107 of file nsIWebBrowserPersist.idl.

Persister is saving data.

Definition at line 109 of file nsIWebBrowserPersist.idl.

Flags governing how data is fetched and saved from the network.

It is best to set this value explicitly unless you are prepared to accept the default values.

Definition at line 104 of file nsIWebBrowserPersist.idl.

Callback listener for progress notifications.

The object that the embbedder supplies may also implement nsIInterfaceRequestor and be prepared to return nsIAuthPrompt or other interfaces that may be required to download data.

See also:
nsIAuthPrompt
nsIInterfaceRequestor

Definition at line 137 of file nsIWebBrowserPersist.idl.

The referring URI for the currently loaded URI or null.

Definition at line 291 of file nsIWebNavigation.idl.

readonly attribute unsigned long nsIWebBrowserPersist::result [inherited]

Value indicating the success or failure of the persist operation.

Returns:
NS_OK Operation was successful or is still ongoing.
NS_BINDING_ABORTED Operation cancelled.
NS_ERROR_FAILURE Non-specific failure.

Definition at line 126 of file nsIWebBrowserPersist.idl.

Definition at line 100 of file nsIDocShellTreeItem.idl.

Definition at line 94 of file nsIDocShellTreeItem.idl.

Definition at line 107 of file nsIDocShellTreeItem.idl.

Definition at line 109 of file nsIScrollable.idl.

Definition at line 107 of file nsIScrollable.idl.

Definition at line 108 of file nsIScrollable.idl.

Definition at line 63 of file nsIScrollable.idl.

Definition at line 64 of file nsIScrollable.idl.

The session history object used by this web navigation instance.

Definition at line 296 of file nsIWebNavigation.idl.

Boolean.

Enables/disables image loading for this browser window. If you disable the images, load a page, then enable the images, the page will not automatically load the images for the previously loaded page. This flag controls the state of a webBrowser at load time and does not automatically re-load a page when the state is toggled. Reloading must be done by hand, or by walking through the DOM tree and re-setting the src attributes.

See also:
setProperty

Definition at line 94 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables Javascript support for this browser.

See also:
setProperty

Definition at line 66 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables meta redirect support for this browser. Meta redirect timers will be ignored if this option is disabled.

See also:
setProperty

Definition at line 74 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables plugin support for this browser.

See also:
setProperty

Definition at line 59 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables subframes within the browser

See also:
setProperty

Definition at line 81 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables whether the document as a whole gets focus before traversing the document's content, or after traversing its content.

NOTE: this property is obsolete and now has no effect

See also:
setProperty

Definition at line 104 of file nsIWebBrowserSetup.idl.

Boolean.

A value of PR_TRUE makes the browser a chrome wrapper. Default is PR_FALSE.

Since:
mozilla1.0
See also:
setProperty

Definition at line 122 of file nsIWebBrowserSetup.idl.

Boolean.

Enables/disables the use of global history in the browser. Visited URLs will not be recorded in the global history when it is disabled.

See also:
setProperty

Definition at line 112 of file nsIWebBrowserSetup.idl.

const unsigned long nsIWebProgressListener::STATE_IS_BROKEN = 0x00000001 [inherited]

Definition at line 205 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_DOCUMENT = 0x00020000 [inherited]

Definition at line 163 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_INSECURE = 0x00000004 [inherited]

State Security Flags.

These flags describe the security state reported by a call to the onSecurityChange method. These flags are mutually exclusive.

STATE_IS_INSECURE This flag indicates that the data corresponding to the request was received over an insecure channel.

STATE_IS_BROKEN This flag indicates an unknown security state. This may mean that the request is being loaded as part of a page in which some content was received over an insecure channel.

STATE_IS_SECURE This flag indicates that the data corresponding to the request was received over a secure channel. The degree of security is expressed by STATE_SECURE_HIGH, STATE_SECURE_MED, or STATE_SECURE_LOW.

Definition at line 204 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_NETWORK = 0x00040000 [inherited]

Definition at line 164 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_REQUEST = 0x00010000 [inherited]

State Type Flags.

These flags further describe the entity for which the state transition is occuring. These flags are NOT mutually exclusive (i.e., an onStateChange event may indicate some combination of these flags).

STATE_IS_REQUEST This flag indicates that the state transition is for a request, which includes but is not limited to document requests. (See below for a description of document requests.) Other types of requests, such as requests for inline content (e.g., images and stylesheets) are considered normal requests.

STATE_IS_DOCUMENT This flag indicates that the state transition is for a document request. This flag is set in addition to STATE_IS_REQUEST. A document request supports the nsIChannel interface and its loadFlags attribute includes the nsIChannel::LOAD_DOCUMENT_URI flag.

A document request does not complete until all requests associated with the loading of its corresponding document have completed. This includes other document requests (e.g., corresponding to HTML <iframe> elements). The document corresponding to a document request is available via the DOMWindow attribute of onStateChange's aWebProgress parameter.

STATE_IS_NETWORK This flag indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. This flag is accompanied by either STATE_START or STATE_STOP, and it may be combined with other State Type Flags.

Unlike STATE_IS_WINDOW, this flag is only set when activity within the nsIWebProgress instance being observed starts or stops. If activity only occurs in a child nsIWebProgress instance, then this flag will be set to indicate the start and stop of that activity.

For example, in the case of navigation within a single frame of a HTML frameset, a nsIWebProgressListener instance attached to the nsIWebProgress of the frameset window will receive onStateChange calls with the STATE_IS_NETWORK flag set to indicate the start and stop of said navigation. In other words, an observer of an outer window can determine when activity, that may be constrained to a child window or set of child windows, starts and stops.

STATE_IS_WINDOW This flag indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. This flag is accompanied by either STATE_START or STATE_STOP, and it may be combined with other State Type Flags.

This flag is similar to STATE_IS_DOCUMENT. However, when a document request completes, two onStateChange calls with STATE_STOP are generated. The document request is passed as aRequest to both calls. The first has STATE_IS_REQUEST and STATE_IS_DOCUMENT set, and the second has the STATE_IS_WINDOW flag set (and possibly the STATE_IS_NETWORK flag set as well -- see above for a description of when the STATE_IS_NETWORK flag may be set). This second STATE_STOP event may be useful as a way to partition the work that occurs when a document request completes.

Definition at line 162 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_SECURE = 0x00000002 [inherited]

Definition at line 206 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_IS_WINDOW = 0x00080000 [inherited]

Definition at line 165 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_NEGOTIATING = 0x00000008 [inherited]

Definition at line 98 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_REDIRECTING = 0x00000002 [inherited]

Definition at line 96 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_RESTORING = 0x01000000 [inherited]

State Modifier Flags.

These flags further describe the transition which is occuring. These flags are NOT mutually exclusive (i.e., an onStateChange event may indicate some combination of these flags).

STATE_RESTORING This flag indicates that the state transition corresponds to the start or stop of activity for restoring a previously-rendered presentation. As such, there is no actual network activity associated with this request, and any modifications made to the document or presentation when it was originally loaded will still be present.

Definition at line 182 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_SECURE_HIGH = 0x00040000 [inherited]

Security Strength Flags.

These flags describe the security strength and accompany STATE_IS_SECURE in a call to the onSecurityChange method. These flags are mutually exclusive.

These flags are not meant to provide a precise description of data transfer security. These are instead intended as a rough indicator that may be used to, for example, color code a security indicator or otherwise provide basic data transfer security feedback to the user.

STATE_SECURE_HIGH This flag indicates a high degree of security.

STATE_SECURE_MED This flag indicates a medium degree of security.

STATE_SECURE_LOW This flag indicates a low degree of security.

Definition at line 229 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_SECURE_LOW = 0x00020000 [inherited]

Definition at line 231 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_SECURE_MED = 0x00010000 [inherited]

Definition at line 230 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_START = 0x00000001 [inherited]

State Transition Flags.

These flags indicate the various states that requests may transition through as they are being loaded. These flags are mutually exclusive.

For any given request, onStateChange is called once with the STATE_START flag, zero or more times with the STATE_TRANSFERRING flag or once with the STATE_REDIRECTING flag, and then finally once with the STATE_STOP flag. NOTE: For document requests, a second STATE_STOP is generated (see the description of STATE_IS_WINDOW for more details).

STATE_START This flag indicates the start of a request. This flag is set when a request is initiated. The request is complete when onStateChange is called for the same request with the STATE_STOP flag set.

STATE_REDIRECTING This flag indicates that a request is being redirected. The request passed to onStateChange is the request that is being redirected. When a redirect occurs, a new request is generated automatically to process the new request. Expect a corresponding STATE_START event for the new request, and a STATE_STOP for the redirected request.

STATE_TRANSFERRING This flag indicates that data for a request is being transferred to an end consumer. This flag indicates that the request has been targeted, and that the user may start seeing content corresponding to the request.

STATE_NEGOTIATING This flag is not used.

STATE_STOP This flag indicates the completion of a request. The aStatus parameter to onStateChange indicates the final status of the request.

Definition at line 95 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_STOP = 0x00000010 [inherited]

Definition at line 99 of file nsIWebProgressListener.idl.

const unsigned long nsIWebProgressListener::STATE_TRANSFERRING = 0x00000004 [inherited]

Definition at line 97 of file nsIWebProgressListener.idl.

const unsigned long nsIWebNavigation::STOP_ALL = 0x03 [inherited]

This flag specifies that all activity should be stopped.

Definition at line 266 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::STOP_CONTENT = 0x02 [inherited]

This flag specifies that all content activity should be stopped.

This includes animated images, plugins and pending Javascript timeouts.

Definition at line 261 of file nsIWebNavigation.idl.

const unsigned long nsIWebNavigation::STOP_NETWORK = 0x01 [inherited]

This flag specifies that all network activity should be stopped.

This includes both active network loads and pending META-refreshes.

Definition at line 255 of file nsIWebNavigation.idl.

attribute wstring nsIBaseWindow::title [inherited]

Definition at line 222 of file nsIBaseWindow.idl.

Definition at line 158 of file nsIDocShellTreeItem.idl.

const long nsIDocShellTreeItem::typeAll = 0x7FFFFFFF [inherited]

Definition at line 76 of file nsIDocShellTreeItem.idl.

Definition at line 71 of file nsIDocShellTreeItem.idl.

Definition at line 74 of file nsIDocShellTreeItem.idl.

Definition at line 72 of file nsIDocShellTreeItem.idl.

Definition at line 73 of file nsIDocShellTreeItem.idl.

Definition at line 192 of file nsIBaseWindow.idl.


The documentation for this class was generated from the following files: