Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
nsXTFXULVisualWrapper.cpp File Reference
#include "nsCOMPtr.h"
#include "nsXTFVisualWrapper.h"
#include "nsIXTFXULVisual.h"
#include "nsXTFWeakTearoff.h"
#include "nsIXTFXULVisualWrapper.h"

Go to the source code of this file.

Classes

class  nsXTFXULVisualWrapper

Typedefs

typedef nsXTFVisualWrapper nsXTFXULVisualWrapperBase

Functions

nsresult NS_NewXTFXULVisualWrapper (nsIXTFXULVisual *xtfElement, nsINodeInfo *ni, nsIContent **aResult)

Typedef Documentation

Definition at line 45 of file nsXTFXULVisualWrapper.cpp.


Function Documentation

nsresult NS_NewXTFXULVisualWrapper ( nsIXTFXULVisual xtfElement,
nsINodeInfo ni,
nsIContent **  aResult 
)

Definition at line 131 of file nsXTFXULVisualWrapper.cpp.

{
  *aResult = nsnull;

  if (!xtfElement) {
    NS_ERROR("can't construct an xtf wrapper without an xtf element");
    return NS_ERROR_FAILURE;
  }
  
  nsXTFXULVisualWrapper* result = new nsXTFXULVisualWrapper(ni, xtfElement);
  if (!result)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(result);

  nsresult rv = result->Init();

  if (NS_FAILED(rv)) {
    NS_RELEASE(result);
    return rv;
  }
  
  *aResult = result;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: