Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions
nsObserverBase Class Reference

#include <nsObserverBase.h>

Inheritance diagram for nsObserverBase:
Inheritance graph

List of all members.

Public Member Functions

 nsObserverBase ()
virtual ~nsObserverBase ()

Protected Member Functions

NS_IMETHOD NotifyWebShell (nsISupports *aWebShell, nsISupports *aChannel, const char *charset, PRInt32 source)

Detailed Description

Definition at line 47 of file nsObserverBase.h.

Constructor & Destructor Documentation

Definition at line 51 of file nsObserverBase.h.

virtual nsObserverBase::~nsObserverBase ( ) [inline, virtual]

Definition at line 52 of file nsObserverBase.h.


Member Function Documentation

NS_IMETHODIMP nsObserverBase::NotifyWebShell ( nsISupports *  aWebShell,
nsISupports *  aChannel,
const char *  charset,
PRInt32  source 
) [protected]

Definition at line 49 of file nsObserverBase.cpp.


   nsresult rv  = NS_OK;
   nsresult res = NS_OK;

   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aChannel,&res));
   if (NS_SUCCEEDED(res)) {
     nsCAutoString method;
     if (method.EqualsLiteral("POST")) { // XXX What about PUT, etc?
       return NS_OK;

   nsCOMPtr<nsIWebShellServices> wss;
   wss = do_QueryInterface(aWebShell,&res);
   if (NS_SUCCEEDED(res)) {

     // ask the webshellservice to load the URL
     if (NS_FAILED( res = wss->SetRendering(PR_FALSE) ))
       rv = res;

     // XXX nisheeth, uncomment the following two line to see the reent problem

     else if (NS_FAILED(res = wss->StopDocumentLoad())){
             rv = wss->SetRendering(PR_TRUE); // turn on the rendering so at least we will see something.
     else if (NS_FAILED(res = wss->ReloadDocument(charset, source))) {
             rv = wss->SetRendering(PR_TRUE); // turn on the rendering so at least we will see something.
     else {
       rv = NS_ERROR_HTMLPARSER_STOPPARSING; // We're reloading a new document...stop loading the current.

   //if our reload request is not accepted, we should tell parser to go on

  return rv;

Here is the call graph for this function:

Here is the caller graph for this function:

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