Bug 745740 - De-ns-ify nsApplicationAccessible, r=tbsaunde, f=eitan
authorMark Capella <markcapella@twcny.rr.com>
Wed, 25 Apr 2012 20:29:40 +0900
changeset 92412 ba1c9beaf75f3bd8bb9d04001e6a645a96989d88
parent 92408 cdb6904fa2cf98115160eeeee3d7a5947d875acc
child 92413 c1e2504f48fd97bab353188588efeb5ff4dc3326
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerstbsaunde
bugs745740
milestone15.0a1
Bug 745740 - De-ns-ify nsApplicationAccessible, r=tbsaunde, f=eitan
accessible/src/atk/ApplicationAccessibleWrap.cpp
accessible/src/atk/ApplicationAccessibleWrap.h
accessible/src/atk/Makefile.in
accessible/src/atk/nsAccessNodeWrap.cpp
accessible/src/atk/nsAccessibleWrap.cpp
accessible/src/atk/nsApplicationAccessibleWrap.cpp
accessible/src/atk/nsApplicationAccessibleWrap.h
accessible/src/base/AccEvent.cpp
accessible/src/base/Makefile.in
accessible/src/base/nsAccDocManager.cpp
accessible/src/base/nsAccessNode.cpp
accessible/src/base/nsAccessNode.h
accessible/src/base/nsAccessibilityService.cpp
accessible/src/base/nsAccessibilityService.h
accessible/src/base/nsApplicationAccessible.cpp
accessible/src/base/nsApplicationAccessible.h
accessible/src/base/nsRootAccessible.cpp
accessible/src/generic/ApplicationAccessible.cpp
accessible/src/generic/ApplicationAccessible.h
accessible/src/generic/Makefile.in
accessible/src/mac/ApplicationAccessibleWrap.h
accessible/src/mac/Makefile.in
accessible/src/mac/nsApplicationAccessibleWrap.h
accessible/src/msaa/ApplicationAccessibleWrap.cpp
accessible/src/msaa/ApplicationAccessibleWrap.h
accessible/src/msaa/Makefile.in
accessible/src/msaa/nsAccessNodeWrap.cpp
accessible/src/msaa/nsApplicationAccessibleWrap.cpp
accessible/src/msaa/nsApplicationAccessibleWrap.h
accessible/src/other/ApplicationAccessibleWrap.h
accessible/src/other/Makefile.in
accessible/src/other/nsApplicationAccessibleWrap.h
rename from accessible/src/atk/nsApplicationAccessibleWrap.cpp
rename to accessible/src/atk/ApplicationAccessibleWrap.cpp
--- a/accessible/src/atk/nsApplicationAccessibleWrap.cpp
+++ b/accessible/src/atk/ApplicationAccessibleWrap.cpp
@@ -33,17 +33,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsApplicationAccessibleWrap.h"
+#include "ApplicationAccessibleWrap.h"
 
 #include "nsCOMPtr.h"
 #include "nsMai.h"
 #include "prlink.h"
 #include "prenv.h"
 #include "nsIGConfService.h"
 #include "nsIServiceManager.h"
 #include "nsAutoPtr.h"
@@ -461,35 +461,29 @@ mai_util_remove_key_event_listener (guin
     }
 
     g_hash_table_remove(sKey_listener_list, GUINT_TO_POINTER (remove_listener));
     if (g_hash_table_size(sKey_listener_list) == 0) {
         gtk_key_snooper_remove(sKey_snooper_id);
     }
 }
 
-AtkObject *
+AtkObject*
 mai_util_get_root(void)
 {
-    if (nsAccessibilityService::IsShutdown()) {
-        // We've shutdown, try to use gail instead
-        // (to avoid assert in spi_atk_tidy_windows())
-        if (gail_get_root)
-            return gail_get_root();
-
-        return nsnull;
-    }
-
-    nsApplicationAccessible *applicationAcc =
-        nsAccessNode::GetApplicationAccessible();
-
-    if (applicationAcc)
-        return applicationAcc->GetAtkObject();
+  if (nsAccessibilityService::IsShutdown()) {
+    // We've shutdown, try to use gail instead
+    // (to avoid assert in spi_atk_tidy_windows())
+    if (gail_get_root)
+      return gail_get_root();
 
     return nsnull;
+  }
+
+  return nsAccessNode::GetApplicationAccessible()->GetAtkObject();
 }
 
 G_CONST_RETURN gchar *
 mai_util_get_toolkit_name(void)
 {
     return MAI_NAME;
 }
 
@@ -545,25 +539,25 @@ add_listener (GSignalEmissionHook listen
     else {
         g_warning("Invalid object type %s\n", object_type);
     }
     return rc;
 }
 
 static nsresult LoadGtkModule(GnomeAccessibilityModule& aModule);
 
-// nsApplicationAccessibleWrap
+// ApplicationAccessibleWrap
 
-nsApplicationAccessibleWrap::nsApplicationAccessibleWrap():
-    nsApplicationAccessible()
+ApplicationAccessibleWrap::ApplicationAccessibleWrap():
+  ApplicationAccessible()
 {
-    MAI_LOG_DEBUG(("======Create AppRootAcc=%p\n", (void*)this));
+  MAI_LOG_DEBUG(("======Create AppRootAcc=%p\n", (void*)this));
 }
 
-nsApplicationAccessibleWrap::~nsApplicationAccessibleWrap()
+ApplicationAccessibleWrap::~ApplicationAccessibleWrap()
 {
     MAI_LOG_DEBUG(("======Destory AppRootAcc=%p\n", (void*)this));
     nsAccessibleWrap::ShutdownAtkObject();
 }
 
 static gboolean
 toplevel_event_watcher(GSignalInvocationHint* ihint,
                        guint                  n_param_values,
@@ -608,17 +602,17 @@ toplevel_event_watcher(GSignalInvocation
 
     }
   }
 
   return TRUE;
 }
 
 bool
-nsApplicationAccessibleWrap::Init()
+ApplicationAccessibleWrap::Init()
 {
     if (ShouldA11yBeEnabled()) {
         // load and initialize gail library
         nsresult rv = LoadGtkModule(sGail);
         if (NS_SUCCEEDED(rv)) {
             (*sGail.init)();
         }
         else {
@@ -650,21 +644,21 @@ nsApplicationAccessibleWrap::Init()
               reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW), NULL);
           sToplevel_hide_hook =
             g_signal_add_emission_hook(g_signal_lookup("hide", GTK_TYPE_WINDOW),
               0, toplevel_event_watcher,
               reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_HIDE), NULL);
         }
     }
 
-    return nsApplicationAccessible::Init();
+    return ApplicationAccessible::Init();
 }
 
 void
-nsApplicationAccessibleWrap::Unload()
+ApplicationAccessibleWrap::Unload()
 {
     if (sToplevel_event_hook_added) {
       sToplevel_event_hook_added = false;
       g_signal_remove_emission_hook(g_signal_lookup("show", GTK_TYPE_WINDOW),
                                     sToplevel_show_hook);
       g_signal_remove_emission_hook(g_signal_lookup("hide", GTK_TYPE_WINDOW),
                                     sToplevel_hide_hook);
     }
@@ -692,27 +686,27 @@ nsApplicationAccessibleWrap::Unload()
     }
     // if (sATKLib) {
     //     PR_UnloadLibrary(sATKLib);
     //     sATKLib = nsnull;
     // }
 }
 
 NS_IMETHODIMP
-nsApplicationAccessibleWrap::GetName(nsAString& aName)
+ApplicationAccessibleWrap::GetName(nsAString& aName)
 {
   // ATK doesn't provide a way to obtain an application name (for example,
   // Firefox or Thunderbird) like IA2 does. Thus let's return an application
   // name as accessible name that was used to get a branding name (for example,
   // Minefield aka nightly Firefox or Daily aka nightly Thunderbird).
   return GetAppName(aName);
 }
 
 NS_IMETHODIMP
-nsApplicationAccessibleWrap::GetNativeInterface(void **aOutAccessible)
+ApplicationAccessibleWrap::GetNativeInterface(void** aOutAccessible)
 {
     *aOutAccessible = nsnull;
 
     if (!mAtkObject) {
         mAtkObject =
             reinterpret_cast<AtkObject *>
                             (g_object_new(MAI_TYPE_ATK_OBJECT, NULL));
         NS_ENSURE_TRUE(mAtkObject, NS_ERROR_OUT_OF_MEMORY);
@@ -740,19 +734,19 @@ gboolean fireRootAccessibleAddedCB(gpoin
     g_object_unref(eventData->app_accessible);
     g_object_unref(eventData->root_accessible);
     free(data);
 
     return FALSE;
 }
 
 bool
-nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
+ApplicationAccessibleWrap::AppendChild(nsAccessible* aChild)
 {
-    if (!nsApplicationAccessible::AppendChild(aChild))
+    if (!ApplicationAccessible::AppendChild(aChild))
       return false;
 
     AtkObject *atkAccessible = nsAccessibleWrap::GetAtkObject(aChild);
     atk_object_set_parent(atkAccessible, mAtkObject);
 
     PRUint32 count = mChildren.Length();
 
     // Emit children_changed::add in a timeout
@@ -767,30 +761,30 @@ nsApplicationAccessibleWrap::AppendChild
       g_object_ref(atkAccessible);
       g_timeout_add(0, fireRootAccessibleAddedCB, eventData);
     }
 
     return true;
 }
 
 bool
-nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
+ApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
 {
     PRInt32 index = aChild->IndexInParent();
 
     AtkObject *atkAccessible = nsAccessibleWrap::GetAtkObject(aChild);
     atk_object_set_parent(atkAccessible, NULL);
     g_signal_emit_by_name(mAtkObject, "children_changed::remove", index,
                           atkAccessible, NULL);
 
-    return nsApplicationAccessible::RemoveChild(aChild);
+    return ApplicationAccessible::RemoveChild(aChild);
 }
 
 void
-nsApplicationAccessibleWrap::PreCreate()
+ApplicationAccessibleWrap::PreCreate()
 {
     if (!sATKChecked) {
         sATKLib = PR_LoadLibrary(sATKLibName);
         if (sATKLib) {
             AtkGetTypeType pfn_atk_hyperlink_impl_get_type = (AtkGetTypeType) PR_FindFunctionSymbol(sATKLib, sATKHyperlinkImplGetTypeSymbol);
             if (pfn_atk_hyperlink_impl_get_type)
                 g_atk_hyperlink_impl_type = pfn_atk_hyperlink_impl_get_type();
 
rename from accessible/src/atk/nsApplicationAccessibleWrap.h
rename to accessible/src/atk/ApplicationAccessibleWrap.h
--- a/accessible/src/atk/nsApplicationAccessibleWrap.h
+++ b/accessible/src/atk/ApplicationAccessibleWrap.h
@@ -33,30 +33,30 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef __NS_APP_ROOT_ACCESSIBLE_H__
-#define __NS_APP_ROOT_ACCESSIBLE_H__
+#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
+#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
 
-#include "nsApplicationAccessible.h"
+#include "ApplicationAccessible.h"
 
-class nsApplicationAccessibleWrap: public nsApplicationAccessible
+class ApplicationAccessibleWrap: public ApplicationAccessible
 {
 public:
     static void Unload();
     static void PreCreate();
 
 public:
-    nsApplicationAccessibleWrap();
-    virtual ~nsApplicationAccessibleWrap();
+    ApplicationAccessibleWrap();
+    virtual ~ApplicationAccessibleWrap();
 
     // nsAccessNode
     virtual bool Init();
 
     // nsAccessible
     NS_IMETHOD GetName(nsAString &aName);
 
     virtual bool AppendChild(nsAccessible* aChild);
--- a/accessible/src/atk/Makefile.in
+++ b/accessible/src/atk/Makefile.in
@@ -48,17 +48,17 @@ LIBXUL_LIBRARY = 1
 
 
 CPPSRCS = \
   AtkSocketAccessible.cpp \
   nsAccessNodeWrap.cpp \
   nsAccessibleWrap.cpp \
   nsDocAccessibleWrap.cpp \
   nsRootAccessibleWrap.cpp \
-  nsApplicationAccessibleWrap.cpp \
+  ApplicationAccessibleWrap.cpp \
   nsMaiInterfaceComponent.cpp \
   nsMaiInterfaceAction.cpp \
   nsMaiInterfaceText.cpp \
   nsMaiInterfaceEditableText.cpp \
   nsMaiInterfaceSelection.cpp \
   nsMaiInterfaceValue.cpp \
   nsMaiHyperlink.cpp \
   nsMaiInterfaceHypertext.cpp \
--- a/accessible/src/atk/nsAccessNodeWrap.cpp
+++ b/accessible/src/atk/nsAccessNodeWrap.cpp
@@ -33,17 +33,16 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessNodeWrap.h"
-#include "nsApplicationAccessibleWrap.h"
 
 /* For documentation of the accessibility architecture, 
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
  */
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessNodeWrap
--- a/accessible/src/atk/nsAccessibleWrap.cpp
+++ b/accessible/src/atk/nsAccessibleWrap.cpp
@@ -36,19 +36,19 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessibleWrap.h"
 
 #include "Accessible-inl.h"
+#include "ApplicationAccessibleWrap.h"
 #include "InterfaceInitFuncs.h"
 #include "nsAccUtils.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsIAccessibleRelation.h"
 #include "nsRootAccessible.h"
 #include "nsDocAccessibleWrap.h"
 #include "nsIAccessibleValue.h"
 #include "nsMai.h"
 #include "nsMaiHyperlink.h"
 #include "nsString.h"
 #include "nsAutoPtr.h"
@@ -63,17 +63,17 @@
 #include "nsComponentManagerUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 nsAccessibleWrap::EAvailableAtkSignals nsAccessibleWrap::gAvailableAtkSignals =
   eUnknown;
 
-//defined in nsApplicationAccessibleWrap.cpp
+//defined in ApplicationAccessibleWrap.cpp
 extern "C" GType g_atk_hyperlink_impl_type;
 
 /* MaiAtkObject */
 
 enum {
   ACTIVATE,
   CREATE,
   DEACTIVATE,
@@ -971,35 +971,30 @@ refRelationSetCB(AtkObject *aAtkObj)
 
   return relation_set;
 }
 
 // Check if aAtkObj is a valid MaiAtkObject, and return the nsAccessibleWrap
 // for it.
 nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj)
 {
-    NS_ENSURE_TRUE(IS_MAI_OBJECT(aAtkObj), nsnull);
-    nsAccessibleWrap *tmpAccWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
+  NS_ENSURE_TRUE(IS_MAI_OBJECT(aAtkObj), nsnull);
+  nsAccessibleWrap* accWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
 
-    // Check if AccessibleWrap was deconstructed
-    if (tmpAccWrap == nsnull) {
-        return nsnull;
-    }
-
-    NS_ENSURE_TRUE(tmpAccWrap->GetAtkObject() == aAtkObj, nsnull);
+  // Check if the accessible was deconstructed.
+  if (!accWrap)
+    return nsnull;
 
-    nsApplicationAccessible *applicationAcc =
-        nsAccessNode::GetApplicationAccessible();
-    nsAccessibleWrap* tmpAppAccWrap =
-        static_cast<nsAccessibleWrap*>(applicationAcc);
+  NS_ENSURE_TRUE(accWrap->GetAtkObject() == aAtkObj, nsnull);
 
-    if (tmpAppAccWrap != tmpAccWrap && !tmpAccWrap->IsValidObject())
-        return nsnull;
+  nsAccessibleWrap* appAccWrap = nsAccessNode::GetApplicationAccessible();
+  if (appAccWrap != accWrap && !accWrap->IsValidObject())
+    return nsnull;
 
-    return tmpAccWrap;
+  return accWrap;
 }
 
 nsresult
 nsAccessibleWrap::HandleAccEvent(AccEvent* aEvent)
 {
     nsresult rv = nsAccessible::HandleAccEvent(aEvent);
     NS_ENSURE_SUCCESS(rv, rv);
 
--- a/accessible/src/base/AccEvent.cpp
+++ b/accessible/src/base/AccEvent.cpp
@@ -34,19 +34,19 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "AccEvent.h"
 
+#include "ApplicationAccessibleWrap.h"
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsDocAccessible.h"
 #include "nsIAccessibleText.h"
 #include "nsAccEvent.h"
 #include "States.h"
 
 #include "nsIDOMDocument.h"
 #include "nsEventStateManager.h"
 #include "nsIServiceManager.h"
@@ -150,17 +150,17 @@ AccEvent::CaptureIsFromUserInput(EIsFrom
 {
   nsINode *targetNode = GetNode();
 
 #ifdef DEBUG
   if (!targetNode) {
     // XXX: remove this hack during reorganization of 506907. Meanwhile we
     // want to get rid an assertion for application accessible events which
     // don't have DOM node (see bug 506206).
-    nsApplicationAccessible *applicationAcc =
+    ApplicationAccessible* applicationAcc =
       nsAccessNode::GetApplicationAccessible();
 
     if (mAccessible != static_cast<nsIAccessible*>(applicationAcc))
       NS_ASSERTION(targetNode, "There should always be a DOM node for an event");
   }
 #endif
 
   if (aIsFromUserInput != eAutoDetect) {
--- a/accessible/src/base/Makefile.in
+++ b/accessible/src/base/Makefile.in
@@ -64,17 +64,16 @@ CPPSRCS = \
   nsAccUtils.cpp \
   nsAccessibilityService.cpp \
   nsAccessible.cpp \
   nsAccessiblePivot.cpp \
   nsAccTreeWalker.cpp \
   nsBaseWidgetAccessible.cpp \
   nsEventShell.cpp \
   nsRootAccessible.cpp \
-  nsApplicationAccessible.cpp \
   nsCaretAccessible.cpp \
   nsTextAccessible.cpp \
   nsTextEquivUtils.cpp \
   StyleInfo.cpp \
   TextAttrs.cpp \
   TextUpdater.cpp \
   $(NULL)
 
--- a/accessible/src/base/nsAccDocManager.cpp
+++ b/accessible/src/base/nsAccDocManager.cpp
@@ -33,19 +33,19 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccDocManager.h"
 
+#include "ApplicationAccessible.h"
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
-#include "nsApplicationAccessible.h"
 #include "nsARIAMap.h"
 #include "nsRootAccessibleWrap.h"
 #include "States.h"
 
 #include "nsCURILoader.h"
 #include "nsDocShellLoadTypes.h"
 #include "nsIChannel.h"
 #include "nsIContentViewer.h"
--- a/accessible/src/base/nsAccessNode.cpp
+++ b/accessible/src/base/nsAccessNode.cpp
@@ -33,19 +33,19 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessNode.h"
 
+#include "ApplicationAccessibleWrap.h"
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsCoreUtils.h"
 #include "nsRootAccessible.h"
 
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDOMWindow.h"
 #include "nsIFrame.h"
 #include "nsIInterfaceRequestorUtils.h"
@@ -62,17 +62,17 @@
 /* For documentation of the accessibility architecture, 
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
  */
 
 nsIStringBundle *nsAccessNode::gStringBundle = 0;
 
 bool nsAccessNode::gIsFormFillEnabled = false;
 
-nsApplicationAccessible *nsAccessNode::gApplicationAccessible = nsnull;
+ApplicationAccessible* nsAccessNode::gApplicationAccessible = nsnull;
 
 /*
  * Class nsAccessNode
  */
  
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessible. nsISupports
 
@@ -125,28 +125,26 @@ nsAccessNode::Init()
 
 void
 nsAccessNode::Shutdown()
 {
   mContent = nsnull;
   mDoc = nsnull;
 }
 
-nsApplicationAccessible*
+ApplicationAccessible*
 nsAccessNode::GetApplicationAccessible()
 {
   NS_ASSERTION(!nsAccessibilityService::IsShutdown(),
                "Accessibility wasn't initialized!");
 
   if (!gApplicationAccessible) {
-    nsApplicationAccessibleWrap::PreCreate();
+    ApplicationAccessibleWrap::PreCreate();
 
-    gApplicationAccessible = new nsApplicationAccessibleWrap();
-    if (!gApplicationAccessible)
-      return nsnull;
+    gApplicationAccessible = new ApplicationAccessibleWrap();
 
     // Addref on create. Will Release in ShutdownXPAccessibility()
     NS_ADDREF(gApplicationAccessible);
 
     nsresult rv = gApplicationAccessible->Init();
     if (NS_FAILED(rv)) {
       gApplicationAccessible->Shutdown();
       NS_RELEASE(gApplicationAccessible);
@@ -195,17 +193,17 @@ void nsAccessNode::ShutdownXPAccessibili
   // Called by nsAccessibilityService::Shutdown()
   // which happens when xpcom is shutting down
   // at exit of program
 
   NS_IF_RELEASE(gStringBundle);
 
   // Release gApplicationAccessible after everything else is shutdown
   // so we don't accidently create it again while tearing down root accessibles
-  nsApplicationAccessibleWrap::Unload();
+  ApplicationAccessibleWrap::Unload();
   if (gApplicationAccessible) {
     gApplicationAccessible->Shutdown();
     NS_RELEASE(gApplicationAccessible);
   }
 
   NotifyA11yInitOrShutdown(false);
 }
 
--- a/accessible/src/base/nsAccessNode.h
+++ b/accessible/src/base/nsAccessNode.h
@@ -48,18 +48,18 @@
 #include "a11yGeneric.h"
 
 #include "nsIContent.h"
 #include "nsIDOMNode.h"
 #include "nsINameSpaceManager.h"
 #include "nsIStringBundle.h"
 #include "nsWeakReference.h"
 
+class ApplicationAccessible;
 class nsAccessNode;
-class nsApplicationAccessible;
 class nsDocAccessible;
 class nsIAccessibleDocument;
 class nsRootAccessible;
 
 class nsIPresShell;
 class nsPresContext;
 class nsIFrame;
 class nsIDocShellTreeItem;
@@ -78,17 +78,17 @@ public:
     NS_DECL_CYCLE_COLLECTION_CLASS(nsAccessNode)
 
     static void InitXPAccessibility();
     static void ShutdownXPAccessibility();
 
   /**
    * Return an application accessible.
    */
-  static nsApplicationAccessible* GetApplicationAccessible();
+  static ApplicationAccessible* GetApplicationAccessible();
 
   /**
    * Return the document accessible for this access node.
    */
   nsDocAccessible* Document() const { return mDoc; }
 
   /**
    * Return the root document accessible for this accessnode.
@@ -169,13 +169,13 @@ protected:
 
   static bool gIsFormFillEnabled;
 
 private:
   nsAccessNode() MOZ_DELETE;
   nsAccessNode(const nsAccessNode&) MOZ_DELETE;
   nsAccessNode& operator =(const nsAccessNode&) MOZ_DELETE;
   
-  static nsApplicationAccessible *gApplicationAccessible;
+  static ApplicationAccessible* gApplicationAccessible;
 };
 
 #endif
 
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -35,25 +35,25 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessibilityService.h"
 
 // NOTE: alphabetically ordered
 #include "Accessible-inl.h"
+#include "ApplicationAccessibleWrap.h"
 #include "ARIAGridAccessibleWrap.h"
 #ifdef MOZ_ACCESSIBILITY_ATK
 #include "AtkSocketAccessible.h"
 #endif
 #include "FocusManager.h"
 #include "nsAccessiblePivot.h"
 #include "nsAccUtils.h"
 #include "nsARIAMap.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsIAccessibleProvider.h"
 #include "nsHTMLCanvasAccessible.h"
 #include "nsHTMLImageMapAccessible.h"
 #include "nsHTMLLinkAccessible.h"
 #include "nsHTMLSelectAccessible.h"
 #include "nsHTMLTableAccessibleWrap.h"
 #include "nsHTMLTextAccessible.h"
 #include "nsHyperTextAccessibleWrap.h"
@@ -673,17 +673,17 @@ nsAccessibilityService::RecreateAccessib
   if (document)
     document->RecreateAccessible(aContent);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIAccessibleRetrieval
 
 NS_IMETHODIMP
-nsAccessibilityService::GetApplicationAccessible(nsIAccessible **aAccessibleApplication)
+nsAccessibilityService::GetApplicationAccessible(nsIAccessible** aAccessibleApplication)
 {
   NS_ENSURE_ARG_POINTER(aAccessibleApplication);
 
   NS_IF_ADDREF(*aAccessibleApplication = nsAccessNode::GetApplicationAccessible());
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -1719,17 +1719,17 @@ nsAccessibilityService::CreateHTMLAccess
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIAccessibilityService (DON'T put methods here)
 
 nsAccessible*
 nsAccessibilityService::AddNativeRootAccessible(void* aAtkAccessible)
  {
 #ifdef MOZ_ACCESSIBILITY_ATK
-  nsApplicationAccessible* applicationAcc =
+  ApplicationAccessible* applicationAcc =
     nsAccessNode::GetApplicationAccessible();
   if (!applicationAcc)
     return nsnull;
 
   nsRefPtr<nsNativeRootAccessibleWrap> nativeRootAcc =
      new nsNativeRootAccessibleWrap((AtkObject*)aAtkAccessible);
   if (!nativeRootAcc)
     return nsnull;
@@ -1740,17 +1740,17 @@ nsAccessibilityService::AddNativeRootAcc
 
   return nsnull;
  }
 
 void
 nsAccessibilityService::RemoveNativeRootAccessible(nsAccessible* aAccessible)
 {
 #ifdef MOZ_ACCESSIBILITY_ATK
-  nsApplicationAccessible* applicationAcc =
+  ApplicationAccessible* applicationAcc =
     nsAccessNode::GetApplicationAccessible();
 
   if (applicationAcc)
     applicationAcc->RemoveChild(aAccessible);
 #endif
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/base/nsAccessibilityService.h
+++ b/accessible/src/base/nsAccessibilityService.h
@@ -58,17 +58,17 @@ namespace a11y {
  * Return focus manager.
  */
 FocusManager* FocusMgr();
 
 #ifdef MOZ_ACCESSIBILITY_ATK
 /**
  * Perform initialization that should be done as soon as possible, in order
  * to minimize startup time.
- * XXX: this function and the next defined in nsApplicationAccessibleWrap.cpp
+ * XXX: this function and the next defined in ApplicationAccessibleWrap.cpp
  */
 void PreInit();
 
 /**
  * Is platform accessibility enabled.
  * Only used on linux with atk for now.
  */
 bool ShouldA11yBeEnabled();
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -37,17 +37,16 @@
 
 #include "mozilla/Util.h"
 
 #define CreateEvent CreateEventA
 #include "nsIDOMDocument.h"
 
 #include "Accessible-inl.h"
 #include "nsAccessibilityService.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 
 #include "mozilla/dom/Element.h"
 #include "nsHTMLSelectAccessible.h"
rename from accessible/src/base/nsApplicationAccessible.cpp
rename to accessible/src/generic/ApplicationAccessible.cpp
--- a/accessible/src/base/nsApplicationAccessible.cpp
+++ b/accessible/src/generic/ApplicationAccessible.cpp
@@ -35,74 +35,74 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
  
-#include "nsApplicationAccessible.h"
+#include "ApplicationAccessible.h"
 
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 
 #include "nsIComponentManager.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsIWindowMediator.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/Services.h"
 
 using namespace mozilla::a11y;
 
-nsApplicationAccessible::nsApplicationAccessible() :
+ApplicationAccessible::ApplicationAccessible() :
   nsAccessibleWrap(nsnull, nsnull)
 {
   mFlags |= eApplicationAccessible;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsISupports
 
-NS_IMPL_ISUPPORTS_INHERITED1(nsApplicationAccessible, nsAccessible,
+NS_IMPL_ISUPPORTS_INHERITED1(ApplicationAccessible, nsAccessible,
                              nsIAccessibleApplication)
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIAccessible
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetParent(nsIAccessible **aAccessible)
+ApplicationAccessible::GetParent(nsIAccessible** aAccessible)
 {
   NS_ENSURE_ARG_POINTER(aAccessible);
   *aAccessible = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetNextSibling(nsIAccessible **aNextSibling)
+ApplicationAccessible::GetNextSibling(nsIAccessible** aNextSibling)
 {
   NS_ENSURE_ARG_POINTER(aNextSibling);
   *aNextSibling = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
+ApplicationAccessible::GetPreviousSibling(nsIAccessible** aPreviousSibling)
 {
   NS_ENSURE_ARG_POINTER(aPreviousSibling);
   *aPreviousSibling = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetName(nsAString& aName)
+ApplicationAccessible::GetName(nsAString& aName)
 {
   aName.Truncate();
 
   nsCOMPtr<nsIStringBundleService> bundleService =
     mozilla::services::GetStringBundleService();
 
   NS_ASSERTION(bundleService, "String bundle service must be present!");
   NS_ENSURE_STATE(bundleService);
@@ -120,182 +120,182 @@ nsApplicationAccessible::GetName(nsAStri
     appName.AssignLiteral("Gecko based application");
   }
 
   aName.Assign(appName);
   return NS_OK;
 }
 
 void
-nsApplicationAccessible::Description(nsString &aDescription)
+ApplicationAccessible::Description(nsString& aDescription)
 {
   aDescription.Truncate();
 }
 
 void
-nsApplicationAccessible::Value(nsString& aValue)
+ApplicationAccessible::Value(nsString& aValue)
 {
   aValue.Truncate();
 }
 
 PRUint64
-nsApplicationAccessible::State()
+ApplicationAccessible::State()
 {
   return IsDefunct() ? states::DEFUNCT : 0;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
+ApplicationAccessible::GetAttributes(nsIPersistentProperties** aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
   *aAttributes = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GroupPosition(PRInt32 *aGroupLevel,
-                                       PRInt32 *aSimilarItemsInGroup,
-                                       PRInt32 *aPositionInGroup)
+ApplicationAccessible::GroupPosition(PRInt32* aGroupLevel,
+                                     PRInt32* aSimilarItemsInGroup,
+                                     PRInt32* aPositionInGroup)
 {
   NS_ENSURE_ARG_POINTER(aGroupLevel);
   *aGroupLevel = 0;
   NS_ENSURE_ARG_POINTER(aSimilarItemsInGroup);
   *aSimilarItemsInGroup = 0;
   NS_ENSURE_ARG_POINTER(aPositionInGroup);
   *aPositionInGroup = 0;
   return NS_OK;
 }
 
 nsAccessible*
-nsApplicationAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
-                                      EWhichChildAtPoint aWhichChild)
+ApplicationAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
+                                    EWhichChildAtPoint aWhichChild)
 {
   return nsnull;
 }
 
 nsAccessible*
-nsApplicationAccessible::FocusedChild()
+ApplicationAccessible::FocusedChild()
 {
   nsAccessible* focus = FocusMgr()->FocusedAccessible();
   if (focus && focus->Parent() == this)
     return focus;
 
   return nsnull;
 }
 
 Relation
-nsApplicationAccessible::RelationByType(PRUint32 aRelationType)
+ApplicationAccessible::RelationByType(PRUint32 aRelationType)
 {
   return Relation();
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
-                                   PRInt32 *aWidth, PRInt32 *aHeight)
+ApplicationAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
+                                 PRInt32* aWidth, PRInt32* aHeight)
 {
   NS_ENSURE_ARG_POINTER(aX);
   *aX = 0;
   NS_ENSURE_ARG_POINTER(aY);
   *aY = 0;
   NS_ENSURE_ARG_POINTER(aWidth);
   *aWidth = 0;
   NS_ENSURE_ARG_POINTER(aHeight);
   *aHeight = 0;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::SetSelected(bool aIsSelected)
+ApplicationAccessible::SetSelected(bool aIsSelected)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::TakeSelection()
+ApplicationAccessible::TakeSelection()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::TakeFocus()
+ApplicationAccessible::TakeFocus()
 {
   return NS_OK;
 }
 
 PRUint8
-nsApplicationAccessible::ActionCount()
+ApplicationAccessible::ActionCount()
 {
   return 0;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetActionName(PRUint8 aIndex, nsAString &aName)
+ApplicationAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
   aName.Truncate();
   return NS_ERROR_INVALID_ARG;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetActionDescription(PRUint8 aIndex,
-                                              nsAString &aDescription)
+ApplicationAccessible::GetActionDescription(PRUint8 aIndex,
+                                            nsAString& aDescription)
 {
   aDescription.Truncate();
   return NS_ERROR_INVALID_ARG;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::DoAction(PRUint8 aIndex)
+ApplicationAccessible::DoAction(PRUint8 aIndex)
 {
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIAccessibleApplication
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetAppName(nsAString& aName)
+ApplicationAccessible::GetAppName(nsAString& aName)
 {
   aName.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
   nsCAutoString cname;
   nsresult rv = mAppInfo->GetName(cname);
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendUTF8toUTF16(cname, aName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetAppVersion(nsAString& aVersion)
+ApplicationAccessible::GetAppVersion(nsAString& aVersion)
 {
   aVersion.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
   nsCAutoString cversion;
   nsresult rv = mAppInfo->GetVersion(cversion);
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendUTF8toUTF16(cversion, aVersion);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetPlatformName(nsAString& aName)
+ApplicationAccessible::GetPlatformName(nsAString& aName)
 {
   aName.AssignLiteral("Gecko");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
+ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
 {
   aVersion.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
   nsCAutoString cversion;
   nsresult rv = mAppInfo->GetPlatformVersion(cversion);
@@ -304,72 +304,72 @@ nsApplicationAccessible::GetPlatformVers
   AppendUTF8toUTF16(cversion, aVersion);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessNode public methods
 
 bool
-nsApplicationAccessible::Init()
+ApplicationAccessible::Init()
 {
   mAppInfo = do_GetService("@mozilla.org/xre/app-info;1");
   return true;
 }
 
 void
-nsApplicationAccessible::Shutdown()
+ApplicationAccessible::Shutdown()
 {
   mAppInfo = nsnull;
 }
 
 bool
-nsApplicationAccessible::IsPrimaryForNode() const
+ApplicationAccessible::IsPrimaryForNode() const
 {
   return false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessible public methods
 
 void
-nsApplicationAccessible::ApplyARIAState(PRUint64* aState)
+ApplicationAccessible::ApplyARIAState(PRUint64* aState)
 {
 }
 
 role
-nsApplicationAccessible::NativeRole()
+ApplicationAccessible::NativeRole()
 {
   return roles::APP_ROOT;
 }
 
 PRUint64
-nsApplicationAccessible::NativeState()
+ApplicationAccessible::NativeState()
 {
   return 0;
 }
 
 void
-nsApplicationAccessible::InvalidateChildren()
+ApplicationAccessible::InvalidateChildren()
 {
   // Do nothing because application children are kept updated by AppendChild()
   // and RemoveChild() method calls.
 }
 
 KeyBinding
-nsApplicationAccessible::AccessKey() const
+ApplicationAccessible::AccessKey() const
 {
   return KeyBinding();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessible protected methods
 
 void
-nsApplicationAccessible::CacheChildren()
+ApplicationAccessible::CacheChildren()
 {
   // CacheChildren is called only once for application accessible when its
   // children are requested because empty InvalidateChldren() prevents its
   // repeated calls.
 
   // Basically children are kept updated by Append/RemoveChild method calls.
   // However if there are open windows before accessibility was started
   // then we need to make sure root accessibles for open windows are created so
@@ -399,64 +399,64 @@ nsApplicationAccessible::CacheChildren()
         GetAccService()->GetDocAccessible(docNode); // ensure creation
       }
     }
     windowEnumerator->HasMoreElements(&hasMore);
   }
 }
 
 nsAccessible*
-nsApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
-                                            nsresult* aError) const
+ApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
+                                          nsresult* aError) const
 {
   if (aError)
     *aError = NS_OK; // fail peacefully
 
   return nsnull;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIAccessible
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetDOMNode(nsIDOMNode **aDOMNode)
+ApplicationAccessible::GetDOMNode(nsIDOMNode** aDOMNode)
 {
   NS_ENSURE_ARG_POINTER(aDOMNode);
   *aDOMNode = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetDocument(nsIAccessibleDocument **aDocument)
+ApplicationAccessible::GetDocument(nsIAccessibleDocument** aDocument)
 {
   NS_ENSURE_ARG_POINTER(aDocument);
   *aDocument = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetRootDocument(nsIAccessibleDocument **aRootDocument)
+ApplicationAccessible::GetRootDocument(nsIAccessibleDocument** aRootDocument)
 {
   NS_ENSURE_ARG_POINTER(aRootDocument);
   *aRootDocument = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::ScrollTo(PRUint32 aScrollType)
+ApplicationAccessible::ScrollTo(PRUint32 aScrollType)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::ScrollToPoint(PRUint32 aCoordinateType,
-                                       PRInt32 aX, PRInt32 aY)
+ApplicationAccessible::ScrollToPoint(PRUint32 aCoordinateType,
+                                     PRInt32 aX, PRInt32 aY)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsApplicationAccessible::GetLanguage(nsAString &aLanguage)
+ApplicationAccessible::GetLanguage(nsAString& aLanguage)
 {
   aLanguage.Truncate();
   return NS_OK;
 }
 
rename from accessible/src/base/nsApplicationAccessible.h
rename to accessible/src/generic/ApplicationAccessible.h
--- a/accessible/src/base/nsApplicationAccessible.h
+++ b/accessible/src/generic/ApplicationAccessible.h
@@ -35,41 +35,41 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef __NS_APPLICATION_ACCESSIBLE_H__
-#define __NS_APPLICATION_ACCESSIBLE_H__
+#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_H__
+#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_H__
 
 #include "nsAccessibleWrap.h"
 #include "nsIAccessibleApplication.h"
 
 #include "nsIMutableArray.h"
 #include "nsIXULAppInfo.h"
 
 /**
- * nsApplicationAccessible is for the whole application of Mozilla.
- * Only one instance of nsApplicationAccessible exists for one Mozilla instance.
+ * ApplicationAccessible is for the whole application of Mozilla.
+ * Only one instance of ApplicationAccessible exists for one Mozilla instance.
  * And this one should be created when Mozilla Startup (if accessibility
  * feature has been enabled) and destroyed when Mozilla Shutdown.
  *
  * All the accessibility objects for toplevel windows are direct children of
- * the nsApplicationAccessible instance.
+ * the ApplicationAccessible instance.
  */
 
-class nsApplicationAccessible: public nsAccessibleWrap,
-                               public nsIAccessibleApplication
+class ApplicationAccessible: public nsAccessibleWrap,
+                             public nsIAccessibleApplication
 {
 public:
 
-  nsApplicationAccessible();
+  ApplicationAccessible();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessible
   NS_SCRIPTABLE NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode);
   NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument);
   NS_SCRIPTABLE NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument);
--- a/accessible/src/generic/Makefile.in
+++ b/accessible/src/generic/Makefile.in
@@ -10,16 +10,17 @@ VPATH = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = accessibility
 LIBRARY_NAME = accessibility_generic_s
 LIBXUL_LIBRARY = 1
 
 
 CPPSRCS = \
+  ApplicationAccessible.cpp \
   ARIAGridAccessible.cpp \
   FormControlAccessible.cpp \
   OuterDocAccessible.cpp \
   $(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
rename from accessible/src/mac/nsApplicationAccessibleWrap.h
rename to accessible/src/mac/ApplicationAccessibleWrap.h
--- a/accessible/src/mac/nsApplicationAccessibleWrap.h
+++ b/accessible/src/mac/ApplicationAccessibleWrap.h
@@ -33,22 +33,22 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
-#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
+#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
+#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
 
-#include "nsApplicationAccessible.h"
+#include "ApplicationAccessible.h"
 
-class nsApplicationAccessibleWrap: public nsApplicationAccessible
+class ApplicationAccessibleWrap: public ApplicationAccessible
 {
 public:
   static void PreCreate() {}
   static void Unload() {}
 };
 
 #endif
 
--- a/accessible/src/mac/Makefile.in
+++ b/accessible/src/mac/Makefile.in
@@ -57,29 +57,29 @@ CMMSRCS = nsAccessNodeWrap.mm \
           mozActionElements.mm \
           mozTextAccessible.mm \
           mozHTMLAccessible.mm \
           MacUtils.mm \
           $(NULL)
 
 
 EXPORTS = \
+  ApplicationAccessibleWrap.h \
   ARIAGridAccessibleWrap.h \
   nsAccessNodeWrap.h \
   nsTextAccessibleWrap.h \
   nsAccessibleWrap.h \
   nsDocAccessibleWrap.h \
   nsRootAccessibleWrap.h \
   nsXULMenuAccessibleWrap.h \
   nsXULListboxAccessibleWrap.h \
   nsXULTreeGridAccessibleWrap.h \
   nsHyperTextAccessibleWrap.h \
   nsHTMLImageAccessibleWrap.h \
   nsHTMLTableAccessibleWrap.h \
-  nsApplicationAccessibleWrap.h \
   mozDocAccessible.h \
   mozAccessible.h \
   mozAccessibleProtocol.h \
   mozActionElements.h \
   mozTextAccessible.h \
   nsRoleMap.h \
   $(NULL)
 
rename from accessible/src/msaa/nsApplicationAccessibleWrap.cpp
rename to accessible/src/msaa/ApplicationAccessibleWrap.cpp
--- a/accessible/src/msaa/nsApplicationAccessibleWrap.cpp
+++ b/accessible/src/msaa/ApplicationAccessibleWrap.cpp
@@ -33,31 +33,31 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsApplicationAccessibleWrap.h"
+#include "ApplicationAccessibleWrap.h"
 
 #include "AccessibleApplication_i.c"
 
 #include "nsIGfxInfo.h"
 #include "nsIPersistentProperties2.h"
 #include "nsServiceManagerUtils.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsISupports
-NS_IMPL_ISUPPORTS_INHERITED0(nsApplicationAccessibleWrap,
-                             nsApplicationAccessible)
+NS_IMPL_ISUPPORTS_INHERITED0(ApplicationAccessibleWrap,
+                             ApplicationAccessible)
 
 NS_IMETHODIMP
-nsApplicationAccessibleWrap::GetAttributes(nsIPersistentProperties** aAttributes)
+ApplicationAccessibleWrap::GetAttributes(nsIPersistentProperties** aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
   *aAttributes = nsnull;
 
   nsCOMPtr<nsIPersistentProperties> attributes =
     do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
   NS_ENSURE_STATE(attributes);
 
@@ -75,34 +75,34 @@ nsApplicationAccessibleWrap::GetAttribut
   attributes.swap(*aAttributes);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // IUnknown
 
 STDMETHODIMP
-nsApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
+ApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
 {
   *ppv = NULL;
 
   if (IID_IAccessibleApplication == iid) {
     *ppv = static_cast<IAccessibleApplication*>(this);
     (reinterpret_cast<IUnknown*>(*ppv))->AddRef();
     return S_OK;
   }
 
   return nsAccessibleWrap::QueryInterface(iid, ppv);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // IAccessibleApplication
 
 STDMETHODIMP
-nsApplicationAccessibleWrap::get_appName(BSTR *aName)
+ApplicationAccessibleWrap::get_appName(BSTR* aName)
 {
 __try {
   *aName = NULL;
 
   if (IsDefunct())
     return CO_E_OBJNOTCONNECTED;
 
   nsAutoString name;
@@ -116,17 +116,17 @@ nsApplicationAccessibleWrap::get_appName
   *aName = ::SysAllocStringLen(name.get(), name.Length());
   return *aName ? S_OK : E_OUTOFMEMORY;
 
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return E_FAIL;
 }
 
 STDMETHODIMP
-nsApplicationAccessibleWrap::get_appVersion(BSTR *aVersion)
+ApplicationAccessibleWrap::get_appVersion(BSTR* aVersion)
 {
 __try {
   *aVersion = NULL;
 
   if (IsDefunct())
     return CO_E_OBJNOTCONNECTED;
 
   nsAutoString version;
@@ -140,17 +140,17 @@ nsApplicationAccessibleWrap::get_appVers
   *aVersion = ::SysAllocStringLen(version.get(), version.Length());
   return *aVersion ? S_OK : E_OUTOFMEMORY;
 
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return E_FAIL;
 }
 
 STDMETHODIMP
-nsApplicationAccessibleWrap::get_toolkitName(BSTR *aName)
+ApplicationAccessibleWrap::get_toolkitName(BSTR* aName)
 {
 __try {
   if (IsDefunct())
     return CO_E_OBJNOTCONNECTED;
 
   nsAutoString name;
   nsresult rv = GetPlatformName(name);
   if (NS_FAILED(rv))
@@ -162,17 +162,17 @@ nsApplicationAccessibleWrap::get_toolkit
   *aName = ::SysAllocStringLen(name.get(), name.Length());
   return *aName ? S_OK : E_OUTOFMEMORY;
 
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return E_FAIL;
 }
 
 STDMETHODIMP
-nsApplicationAccessibleWrap::get_toolkitVersion(BSTR *aVersion)
+ApplicationAccessibleWrap::get_toolkitVersion(BSTR* aVersion)
 {
 __try {
   *aVersion = NULL;
 
   if (IsDefunct())
     return CO_E_OBJNOTCONNECTED;
 
   nsAutoString version;
@@ -186,20 +186,20 @@ nsApplicationAccessibleWrap::get_toolkit
   *aVersion = ::SysAllocStringLen(version.get(), version.Length());
   return *aVersion ? S_OK : E_OUTOFMEMORY;
 
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return E_FAIL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsApplicationAccessibleWrap public static
+// ApplicationAccessibleWrap public static
 
 void
-nsApplicationAccessibleWrap::PreCreate()
+ApplicationAccessibleWrap::PreCreate()
 {
 }
 
 void
-nsApplicationAccessibleWrap::Unload()
+ApplicationAccessibleWrap::Unload()
 {
 }
 
rename from accessible/src/msaa/nsApplicationAccessibleWrap.h
rename to accessible/src/msaa/ApplicationAccessibleWrap.h
--- a/accessible/src/msaa/nsApplicationAccessibleWrap.h
+++ b/accessible/src/msaa/ApplicationAccessibleWrap.h
@@ -33,25 +33,25 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
-#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
+#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
+#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
 
-#include "nsApplicationAccessible.h"
+#include "ApplicationAccessible.h"
 
 #include "AccessibleApplication.h"
 
-class nsApplicationAccessibleWrap: public nsApplicationAccessible,
-                                   public IAccessibleApplication
+class ApplicationAccessibleWrap: public ApplicationAccessible,
+                                 public IAccessibleApplication
 {
 public:
   // nsISupporst
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessible
   NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes);
 
--- a/accessible/src/msaa/Makefile.in
+++ b/accessible/src/msaa/Makefile.in
@@ -43,60 +43,60 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE = accessibility
 LIBRARY_NAME = accessibility_toolkit_s
 EXPORT_LIBRARY = ..
 LIBXUL_LIBRARY = 1
 
 
 CPPSRCS = \
+  ApplicationAccessibleWrap.cpp \
+  ARIAGridAccessibleWrap.cpp \
   nsAccessNodeWrap.cpp \
   nsAccessibleWrap.cpp \
   nsTextAccessibleWrap.cpp \
   nsDocAccessibleWrap.cpp \
   nsHTMLWin32ObjectAccessible.cpp \
-  ARIAGridAccessibleWrap.cpp \
   nsRootAccessibleWrap.cpp \
   nsXULMenuAccessibleWrap.cpp \
   nsXULListboxAccessibleWrap.cpp \
   nsXULTreeGridAccessibleWrap.cpp \
   nsHyperTextAccessibleWrap.cpp \
   nsHTMLImageAccessibleWrap.cpp \
   nsHTMLTableAccessibleWrap.cpp \
-  nsApplicationAccessibleWrap.cpp \
   nsWinUtils.cpp \
   ia2AccessibleAction.cpp \
   ia2AccessibleComponent.cpp \
   CAccessibleImage.cpp \
   CAccessibleText.cpp \
   CAccessibleEditableText.cpp \
   CAccessibleHyperlink.cpp \
   ia2AccessibleHypertext.cpp \
   ia2AccessibleRelation.cpp \
   CAccessibleTable.cpp \
   CAccessibleTableCell.cpp \
   CAccessibleValue.cpp \
   Compatibility.cpp \
   $(NULL)
 
 EXPORTS = \
+  ApplicationAccessibleWrap.h \
   ARIAGridAccessibleWrap.h \
   nsAccessNodeWrap.h \
   nsAccessibleWrap.h \
   nsTextAccessibleWrap.h \
   nsDocAccessibleWrap.h \
   nsRootAccessibleWrap.h \
   nsHTMLWin32ObjectAccessible.h \
   nsXULMenuAccessibleWrap.h \
   nsXULListboxAccessibleWrap.h \
   nsXULTreeGridAccessibleWrap.h \
   nsHyperTextAccessibleWrap.h \
   nsHTMLImageAccessibleWrap.h \
   nsHTMLTableAccessibleWrap.h \
-  nsApplicationAccessibleWrap.h \
   ia2AccessibleAction.h \
   ia2AccessibleComponent.h \
   CAccessibleImage.h \
   CAccessibleText.h \
   CAccessibleEditableText.h \
   CAccessibleHyperlink.h \
   ia2AccessibleHypertext.h \
   CAccessibleTable.h \
--- a/accessible/src/msaa/nsAccessNodeWrap.cpp
+++ b/accessible/src/msaa/nsAccessNodeWrap.cpp
@@ -34,21 +34,21 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessNodeWrap.h"
 
 #include "AccessibleApplication.h"
+#include "ApplicationAccessibleWrap.h"
 #include "ISimpleDOMNode_i.c"
 
 #include "Compatibility.h"
 #include "nsAccessibilityService.h"
-#include "nsApplicationAccessibleWrap.h"
 #include "nsCoreUtils.h"
 #include "nsRootAccessible.h"
 #include "nsWinUtils.h"
 #include "Statistics.h"
 
 #include "nsAttrName.h"
 #include "nsIDocument.h"
 #include "nsIDOMNodeList.h"
@@ -169,17 +169,17 @@ nsAccessNodeWrap::QueryService(REFGUID g
     *ppv = static_cast<IAccessible*>(docAcc);
 
     (reinterpret_cast<IUnknown*>(*ppv))->AddRef();
     return NS_OK;
   }
 
   // Can get to IAccessibleApplication from any node via QS
   if (iid == IID_IAccessibleApplication) {
-    nsApplicationAccessible *applicationAcc = GetApplicationAccessible();
+    ApplicationAccessible* applicationAcc = GetApplicationAccessible();
     if (!applicationAcc)
       return E_NOINTERFACE;
 
     nsresult rv = applicationAcc->QueryNativeInterface(iid, ppv);
     return NS_SUCCEEDED(rv) ? S_OK : E_NOINTERFACE;
   }
 
   /**
rename from accessible/src/other/nsApplicationAccessibleWrap.h
rename to accessible/src/other/ApplicationAccessibleWrap.h
--- a/accessible/src/other/nsApplicationAccessibleWrap.h
+++ b/accessible/src/other/ApplicationAccessibleWrap.h
@@ -33,22 +33,22 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
-#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
+#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
+#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
 
-#include "nsApplicationAccessible.h"
+#include "ApplicationAccessible.h"
 
-class nsApplicationAccessibleWrap: public nsApplicationAccessible
+class ApplicationAccessibleWrap: public ApplicationAccessible
 {
 public:
   static void PreCreate() {}
   static void Unload() {}
 };
 
 #endif
 
--- a/accessible/src/other/Makefile.in
+++ b/accessible/src/other/Makefile.in
@@ -49,29 +49,29 @@ LIBXUL_LIBRARY = 1
 
 CPPSRCS = \
   nsAccessNodeWrap.cpp \
   nsAccessibleWrap.cpp \
   nsRootAccessibleWrap.cpp \
   $(NULL)
 
 EXPORTS = \
+  ApplicationAccessibleWrap.h \
   ARIAGridAccessibleWrap.h \
   nsAccessNodeWrap.h \
   nsTextAccessibleWrap.h \
   nsAccessibleWrap.h \
   nsDocAccessibleWrap.h \
   nsRootAccessibleWrap.h \
   nsXULMenuAccessibleWrap.h \
   nsXULListboxAccessibleWrap.h \
   nsXULTreeGridAccessibleWrap.h \
   nsHyperTextAccessibleWrap.h \
   nsHTMLImageAccessibleWrap.h \
   nsHTMLTableAccessibleWrap.h \
-  nsApplicationAccessibleWrap.h \
   $(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \