Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsXULControllers.cpp File Reference
#include "nsString.h"
#include "nsIControllers.h"
#include "nsIDOMElement.h"
#include "nsIDOMXULCommandDispatcher.h"
#include "nsXULControllers.h"
#include "nsContentUtils.h"

Go to the source code of this file.

Functions

NS_IMETHODIMP NS_NewXULControllers (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static char * cloneAllAccess ()
static char * cloneUniversalXPConnect ()

Function Documentation

static char* cloneAllAccess ( ) [static]

Definition at line 301 of file nsXULControllers.cpp.

{
  static const char allAccess[] = "AllAccess";
  return (char*)nsMemory::Clone(allAccess, sizeof(allAccess));
}

Here is the call graph for this function:

static char* cloneUniversalXPConnect ( ) [static]

Definition at line 307 of file nsXULControllers.cpp.

{
  static const char universalXPConnect[] = "UniversalXPConnect";
  return (char*)nsMemory::Clone(universalXPConnect, sizeof(universalXPConnect));
}

Here is the call graph for this function:

NS_IMETHODIMP NS_NewXULControllers ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 84 of file nsXULControllers.cpp.

{
  NS_PRECONDITION(aOuter == nsnull, "no aggregation");
  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;

  nsXULControllers* controllers = new nsXULControllers();
  if (! controllers)
    return NS_ERROR_OUT_OF_MEMORY;
  
  nsresult rv;
  NS_ADDREF(controllers);
  rv = controllers->QueryInterface(aIID, aResult);
  NS_RELEASE(controllers);
  return rv;
}

Here is the call graph for this function: