Commit 0eeced87 authored by Ryan Hunt's avatar Ryan Hunt
Browse files

Bug 1534395 - Rename TabParent to BrowserParent. r=nika

This commit renames TabParent to BrowserParent.

Differential Revision: https://phabricator.services.mozilla.com/D28133

--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
extra : rebase_source : d2706b9f42177d8de16068b7b1d088a44b8720a4
extra : histedit_source : a617ddac45c58050ef799116a67d2d983f2a8f6d%2C1d1dabd8761a32d548a6fbf1027be960698f6a5e
parent 3675f244
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include "nsIPersistentProperties2.h"

#include "mozilla/PresShell.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/BrowserParent.h"
#include "mozilla/a11y/DocAccessibleParent.h"
#include "mozilla/a11y/DocManager.h"

@@ -120,7 +120,8 @@ void SessionAccessibility::Click(int32_t aID) {

SessionAccessibility* SessionAccessibility::GetInstanceFor(
    ProxyAccessible* aAccessible) {
  auto tab = static_cast<dom::TabParent*>(aAccessible->Document()->Manager());
  auto tab =
      static_cast<dom::BrowserParent*>(aAccessible->Document()->Manager());
  dom::Element* frame = tab->GetOwnerElement();
  MOZ_ASSERT(frame);
  if (!frame) {
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include "mozilla/a11y/DocManager.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/BrowserParent.h"

namespace mozilla {
namespace a11y {
@@ -176,7 +176,7 @@ void FocusManager::ActiveItemChanged(Accessible* aItem, bool aCheckIfActive) {
    if (domfm) {
      nsIContent* focusedElm = domfm->GetFocusedElement();
      if (EventStateManager::IsRemoteTarget(focusedElm)) {
        dom::TabParent* tab = dom::TabParent::GetFrom(focusedElm);
        dom::BrowserParent* tab = dom::BrowserParent::GetFrom(focusedElm);
        if (tab) {
          a11y::DocAccessibleParent* dap = tab->GetTopLevelDocAccessible();
          if (dap) {
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
#include "nsAccUtils.h"
#include "DocAccessible-inl.h"
#include "mozilla/a11y/DocAccessibleParent.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/BrowserParent.h"
#include "Role.h"
#include "States.h"

@@ -185,7 +185,7 @@ Accessible* OuterDocAccessible::GetChildAt(uint32_t aIndex) const {
#endif  // defined(XP_WIN)

DocAccessibleParent* OuterDocAccessible::RemoteChildDoc() const {
  dom::TabParent* tab = dom::TabParent::GetFrom(GetContent());
  dom::BrowserParent* tab = dom::BrowserParent::GetFrom(GetContent());
  if (!tab) return nullptr;

  return tab->GetTopLevelDocAccessible();
+4 −4
Original line number Diff line number Diff line
@@ -669,12 +669,12 @@ ProxyAccessible* RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const {
  mDocumentNode->GetDocShell()->GetTreeOwner(getter_AddRefs(owner));
  NS_ENSURE_TRUE(owner, nullptr);

  nsCOMPtr<nsIRemoteTab> tabParent;
  owner->GetPrimaryRemoteTab(getter_AddRefs(tabParent));
  if (!tabParent) {
  nsCOMPtr<nsIRemoteTab> browserParent;
  owner->GetPrimaryRemoteTab(getter_AddRefs(browserParent));
  if (!browserParent) {
    return nullptr;
  }

  auto tab = static_cast<dom::TabParent*>(tabParent.get());
  auto tab = static_cast<dom::BrowserParent*>(browserParent.get());
  return tab->GetTopLevelDocAccessible();
}
+5 −5
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

#include "DocAccessibleParent.h"
#include "mozilla/a11y/Platform.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/BrowserParent.h"
#include "xpcAccessibleDocument.h"
#include "xpcAccEvents.h"
#include "nsAccUtils.h"
@@ -541,7 +541,7 @@ ipc::IPCResult DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
mozilla::ipc::IPCResult DocAccessibleParent::RecvShutdown() {
  Destroy();

  auto mgr = static_cast<dom::TabParent*>(Manager());
  auto mgr = static_cast<dom::BrowserParent*>(Manager());
  if (!mgr->IsDestroyed()) {
    if (!PDocAccessibleParent::Send__delete__(this)) {
      return IPC_FAIL_NO_REASON(mgr);
@@ -654,7 +654,7 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
    return;
  }

  // XXX get the bounds from the tabParent instead of poking at accessibles
  // XXX get the bounds from the browserParent instead of poking at accessibles
  // which might not exist yet.
  Accessible* outerDoc = OuterDocOfRemoteBrowser();
  if (!outerDoc) {
@@ -672,7 +672,7 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
    rect.MoveToX(rootRect.X() - rect.X());
    rect.MoveToY(rect.Y() - rootRect.Y());

    auto tab = static_cast<dom::TabParent*>(Manager());
    auto tab = static_cast<dom::BrowserParent*>(Manager());
    tab->GetDocShellIsActive(&isActive);
  }

@@ -708,7 +708,7 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
 */
void DocAccessibleParent::SendParentCOMProxy() {
  // Make sure that we're not racing with a tab shutdown
  auto tab = static_cast<dom::TabParent*>(Manager());
  auto tab = static_cast<dom::BrowserParent*>(Manager());
  MOZ_ASSERT(tab);
  if (tab->IsDestroyed()) {
    return;
Loading