Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Static Private Attributes
nsCocoaBrowserService Class Reference

#include <nsCocoaBrowserService.h>

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

List of all members.

Public Member Functions

 nsCocoaBrowserService ()
virtual ~nsCocoaBrowserService ()
nsAlertControllerGetAlertController ()
void createInstance (in nsISupports aOuter, in nsIIDRef iid,[retval, iid_is(iid)] out nsQIResult result)
 Creates an instance of a component.
void lockFactory (in PRBool lock)
 LockFactory provides the client a way to keep the component in memory until it is finished with it.

Static Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIWINDOWCREATOR
NS_DECL_NSIPROMPTSERVICE
static NS_DECL_NSIFACTORY
nsresult 
InitEmbedding ()
static void TermEmbedding ()
static void SetAlertController (nsAlertController *aController)

Static Private Attributes

static PRUint32 sNumBrowsers = 0
static nsCocoaBrowserServicesSingleton = nsnull
static nsAlertControllersController = nsnull

Detailed Description

Definition at line 46 of file nsCocoaBrowserService.h.


Constructor & Destructor Documentation

Definition at line 53 of file nsCocoaBrowserService.mm.

{
}

Definition at line 57 of file nsCocoaBrowserService.mm.

Here is the call graph for this function:


Member Function Documentation

void nsIFactory::createInstance ( in nsISupports  aOuter,
in nsIIDRef  iid,
[retval, iid_is(iid)] out nsQIResult  result 
) [inherited]

Creates an instance of a component.

Parameters:
aOuterPointer to a component that wishes to be aggregated in the resulting instance. This will be nsnull if no aggregation is requested.
iidThe IID of the interface being requested in the component which is being currently created.
result[out] Pointer to the newly created instance, if successful.
Returns:
NS_OK - Component successfully created and the interface being requested was successfully returned in result. NS_NOINTERFACE - Interface not accessible. NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the component is not aggregatable. NS_ERROR* - Method failure.

Definition at line 159 of file nsCocoaBrowserService.mm.

{
  if (!sController) {
    NSBundle* bundle = [NSBundle bundleForClass:[NSBrowserView class]];
    [bundle loadNibFile:@NS_ALERT_NIB_NAME externalNameTable:nsnull withZone:[NSApp zone]];
  }
  return sController;
}
NS_DECL_ISUPPORTS NS_DECL_NSIWINDOWCREATOR NS_DECL_NSIPROMPTSERVICE static NS_DECL_NSIFACTORY nsresult nsCocoaBrowserService::InitEmbedding ( ) [static]
void nsIFactory::lockFactory ( in PRBool  lock) [inherited]

LockFactory provides the client a way to keep the component in memory until it is finished with it.

The client can call LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) to release the factory.

Parameters:
lock- Must be PR_TRUE or PR_FALSE
Returns:
NS_OK - If the lock operation was successful. NS_ERROR* - Method failure.

Definition at line 169 of file nsCocoaBrowserService.mm.

{
  // XXX When should the controller be released?
  sController = aController;
  [sController retain];
}

Definition at line 149 of file nsCocoaBrowserService.mm.

{
  if (--sNumBrowsers == 0) {
    NS_RELEASE(sSingleton);
  }
}

Member Data Documentation

Definition at line 68 of file nsCocoaBrowserService.h.

Definition at line 66 of file nsCocoaBrowserService.h.

Definition at line 67 of file nsCocoaBrowserService.h.


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