Logo Search packages:      
Sourcecode: xulrunner-1.9 version File versions

already_AddRefed< nsApplicationAccessibleWrap > nsAccessNode::GetApplicationAccessible (  )  [static, inherited]

Return an application accessible.

Definition at line 237 of file nsAccessNode.cpp.

{
  if (!gIsAccessibilityActive) {
    return nsnull;
  }

  if (!gApplicationAccessible) {
    nsApplicationAccessibleWrap::PreCreate();

    gApplicationAccessible = new nsApplicationAccessibleWrap();
    if (!gApplicationAccessible)
      return nsnull;

    // Addref on create. Will Release in ShutdownXPAccessibility()
    NS_ADDREF(gApplicationAccessible);

    nsresult rv = gApplicationAccessible->Init();
    if (NS_FAILED(rv)) {
      NS_RELEASE(gApplicationAccessible);
      gApplicationAccessible = nsnull;
      return nsnull;
    }
  }

  NS_ADDREF(gApplicationAccessible);   // Addref because we're a getter
  return gApplicationAccessible;
}


Generated by  Doxygen 1.6.0   Back to index