Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Static Public Attributes
nsXBLSpecialDocInfo Class Reference
Collaboration diagram for nsXBLSpecialDocInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void LoadDocInfo ()
void GetAllHandlers (const char *aType, nsXBLPrototypeHandler **handler, nsXBLPrototypeHandler **userHandler)
void GetHandlers (nsIXBLDocumentInfo *aInfo, const nsACString &aRef, nsXBLPrototypeHandler **aResult)
 nsXBLSpecialDocInfo ()

Public Attributes

nsCOMPtr< nsIXBLDocumentInfomHTMLBindings
nsCOMPtr< nsIXBLDocumentInfomUserHTMLBindings
PRBool mInitialized

Static Public Attributes

static const char sHTMLBindingStr [] = "chrome://global/content/platformHTMLBindings.xml"
static const char sUserHTMLBindingStr []

Detailed Description

Definition at line 73 of file nsXBLWindowHandler.cpp.


Constructor & Destructor Documentation

Definition at line 93 of file nsXBLWindowHandler.cpp.


Member Function Documentation

void nsXBLSpecialDocInfo::GetAllHandlers ( const char *  aType,
nsXBLPrototypeHandler **  handler,
nsXBLPrototypeHandler **  userHandler 
)

Definition at line 156 of file nsXBLWindowHandler.cpp.

{
  if (mUserHTMLBindings) {
    nsCAutoString type(aType);
    type.Append("User");
    GetHandlers(mUserHTMLBindings, type, aUserHandler);
  }
  if (mHTMLBindings) {
    GetHandlers(mHTMLBindings, nsDependentCString(aType), aHandler);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsXBLSpecialDocInfo::GetHandlers ( nsIXBLDocumentInfo aInfo,
const nsACString &  aRef,
nsXBLPrototypeHandler **  aResult 
)

Definition at line 141 of file nsXBLWindowHandler.cpp.

{
  nsXBLPrototypeBinding* binding;
  aInfo->GetPrototypeBinding(aRef, &binding);
  
  NS_ASSERTION(binding, "No binding found for the XBL window key handler.");
  if (!binding)
    return;

  *aResult = binding->GetPrototypeHandlers();
} // GetHandlers

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file nsXBLWindowHandler.cpp.

{
  if (mInitialized)
    return;
  mInitialized = PR_TRUE;

  nsresult rv;
  nsCOMPtr<nsIXBLService> xblService = 
           do_GetService("@mozilla.org/xbl;1", &rv);
  if (NS_FAILED(rv) || !xblService)
    return;

  // Obtain the platform doc info
  nsCOMPtr<nsIURI> bindingURI;
  NS_NewURI(getter_AddRefs(bindingURI), sHTMLBindingStr);
  if (!bindingURI) {
    return;
  }
  xblService->LoadBindingDocumentInfo(nsnull, nsnull,
                                      bindingURI,
                                      PR_TRUE, 
                                      getter_AddRefs(mHTMLBindings));

  const nsAdoptingCString& userHTMLBindingStr =
    nsContentUtils::GetCharPref("dom.userHTMLBindings.uri");
  if (!userHTMLBindingStr.IsEmpty()) {
    NS_NewURI(getter_AddRefs(bindingURI), userHTMLBindingStr);
    if (!bindingURI) {
      return;
    }

    xblService->LoadBindingDocumentInfo(nsnull, nsnull,
                                        bindingURI,
                                        PR_TRUE, 
                                        getter_AddRefs(mUserHTMLBindings));
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 76 of file nsXBLWindowHandler.cpp.

Definition at line 82 of file nsXBLWindowHandler.cpp.

Definition at line 77 of file nsXBLWindowHandler.cpp.

Definition at line 79 of file nsXBLWindowHandler.cpp.

Definition at line 80 of file nsXBLWindowHandler.cpp.


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