Bug 1532725 - Rename PRemoteFrame to PBrowserBridge. r=nika
authorRyan Hunt <rhunt@eqrion.net>
Mon, 04 Mar 2019 20:15:58 -0600
changeset 521235 48241ea6a125e5ec01dbb323da92adabfb4ea480
parent 521234 8c8e2862fd5e6df9fd5279324ecf941960a9a291
child 521236 8426cec31aaee1ebf3b08d7287ad54f9bf4f6d97
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1532725
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532725 - Rename PRemoteFrame to PBrowserBridge. r=nika Differential Revision: https://phabricator.services.mozilla.com/D22132
dom/base/nsContentUtils.cpp
dom/base/nsFocusManager.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsFrameLoader.h
dom/ipc/BrowserBridgeChild.cpp
dom/ipc/BrowserBridgeChild.h
dom/ipc/BrowserBridgeParent.cpp
dom/ipc/BrowserBridgeParent.h
dom/ipc/MemoryReportRequest.cpp
dom/ipc/PBrowser.ipdl
dom/ipc/PBrowserBridge.ipdl
dom/ipc/PRemoteFrame.ipdl
dom/ipc/PermissionMessageUtils.cpp
dom/ipc/RemoteFrameChild.cpp
dom/ipc/RemoteFrameChild.h
dom/ipc/RemoteFrameParent.cpp
dom/ipc/RemoteFrameParent.h
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
dom/ipc/moz.build
layout/ipc/RenderFrame.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -65,17 +65,17 @@
 #include "mozilla/dom/HTMLTemplateElement.h"
 #include "mozilla/dom/HTMLTextAreaElement.h"
 #include "mozilla/dom/IDTracker.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/KeyboardEventBinding.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/Promise.h"
-#include "mozilla/dom/RemoteFrameChild.h"
+#include "mozilla/dom/BrowserBridgeChild.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/Text.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/XULCommandEvent.h"
 #include "mozilla/dom/WorkerCommon.h"
 #include "mozilla/EventDispatcher.h"
@@ -6194,17 +6194,17 @@ bool nsContentUtils::IsSubDocumentTabbab
   Document* doc = aContent->GetComposedDoc();
   if (!doc) {
     return false;
   }
 
   // If the subdocument lives in another process, the frame is
   // tabbable.
   if (EventStateManager::IsRemoteTarget(aContent) ||
-      RemoteFrameChild::GetFrom(aContent)) {
+      BrowserBridgeChild::GetFrom(aContent)) {
     return true;
   }
 
   // XXXbz should this use OwnerDoc() for GetSubDocumentFor?
   // sXBL/XBL2 issue!
   Document* subDoc = doc->GetSubDocumentFor(aContent);
   if (!subDoc) {
     return false;
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -46,17 +46,17 @@
 #include "nsRange.h"
 
 #include "mozilla/AccessibleCaretEventHub.h"
 #include "mozilla/ContentEvents.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLImageElement.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "mozilla/dom/HTMLSlotElement.h"
-#include "mozilla/dom/RemoteFrameChild.h"
+#include "mozilla/dom/BrowserBridgeChild.h"
 #include "mozilla/dom/Text.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/HTMLEditor.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
@@ -1849,18 +1849,18 @@ void nsFocusManager::Focus(nsPIDOMWindow
         // if the object being focused is a remote browser, activate remote
         // content
         if (TabParent* remote = TabParent::GetFrom(aElement)) {
           remote->Activate();
           LOGFOCUS(("Remote browser activated"));
         }
 
         // Same as above but for out-of-process iframes
-        if (RemoteFrameChild* rfc = RemoteFrameChild::GetFrom(aElement)) {
-          rfc->Activate();
+        if (BrowserBridgeChild* bbc = BrowserBridgeChild::GetFrom(aElement)) {
+          bbc->Activate();
           LOGFOCUS(("Out-of-process iframe activated"));
         }
       }
 
       IMEStateManager::OnChangeFocus(presContext, aElement,
                                      GetFocusMoveActionCause(aFlags));
 
       // as long as this focus wasn't because a window was raised, update the
@@ -3470,19 +3470,19 @@ nsresult nsFocusManager::GetNextTabbable
           // into document navigation again by calling MoveFocus.
           TabParent* remote = TabParent::GetFrom(currentContent);
           if (remote) {
             remote->NavigateByKey(aForward, aForDocumentNavigation);
             return NS_SUCCESS_DOM_NO_OPERATION;
           }
 
           // Same as above but for out-of-process iframes
-          RemoteFrameChild* rfc = RemoteFrameChild::GetFrom(currentContent);
-          if (rfc) {
-            rfc->NavigateByKey(aForward, aForDocumentNavigation);
+          BrowserBridgeChild* bbc = BrowserBridgeChild::GetFrom(currentContent);
+          if (bbc) {
+            bbc->NavigateByKey(aForward, aForDocumentNavigation);
             return NS_SUCCESS_DOM_NO_OPERATION;
           }
 
           // Next, for document navigation, check if this a non-remote child
           // document.
           bool checkSubDocument = true;
           if (aForDocumentNavigation &&
               TryDocumentNavigation(currentContent, &checkSubDocument,
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -99,17 +99,17 @@
 #include "mozilla/dom/ipc/StructuredCloneData.h"
 #include "mozilla/WebBrowserPersistLocalDocument.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/dom/ParentSHistory.h"
 #include "mozilla/dom/ChildSHistory.h"
 #include "mozilla/dom/CanonicalBrowsingContext.h"
 #include "mozilla/dom/ContentChild.h"
-#include "mozilla/dom/RemoteFrameChild.h"
+#include "mozilla/dom/BrowserBridgeChild.h"
 
 #include "mozilla/dom/HTMLBodyElement.h"
 
 #include "mozilla/ContentPrincipal.h"
 
 #ifdef XP_WIN
 #  include "mozilla/plugins/PPluginWidgetParent.h"
 #  include "../plugins/ipc/PluginWidgetParent.h"
@@ -339,25 +339,25 @@ nsresult nsFrameLoader::ReallyStartLoadi
 
 nsresult nsFrameLoader::ReallyStartLoadingInternal() {
   NS_ENSURE_STATE(mURIToLoad && mOwnerContent &&
                   mOwnerContent->IsInComposedDoc());
 
   AUTO_PROFILER_LABEL("nsFrameLoader::ReallyStartLoadingInternal", OTHER);
 
   if (IsRemoteFrame()) {
-    if (!mRemoteBrowser && !mRemoteFrameChild && !TryRemoteBrowser()) {
+    if (!mRemoteBrowser && !mBrowserBridgeChild && !TryRemoteBrowser()) {
       NS_WARNING("Couldn't create child process for iframe.");
       return NS_ERROR_FAILURE;
     }
 
-    if (mRemoteFrameChild) {
+    if (mBrowserBridgeChild) {
       nsAutoCString spec;
       mURIToLoad->GetSpec(spec);
-      Unused << mRemoteFrameChild->SendLoadURL(spec);
+      Unused << mBrowserBridgeChild->SendLoadURL(spec);
     } else {
       // FIXME get error codes from child
       mRemoteBrowser->LoadURL(mURIToLoad);
     }
 
     if (!mRemoteBrowserShown) {
       // This can fail if it's too early to show the frame, we will retry later.
       Unused << ShowRemoteFrame(ScreenIntSize(0, 0));
@@ -801,17 +801,17 @@ void nsFrameLoader::MarginsChanged(uint3
 }
 
 bool nsFrameLoader::ShowRemoteFrame(const ScreenIntSize& size,
                                     nsSubDocumentFrame* aFrame) {
   AUTO_PROFILER_LABEL("nsFrameLoader::ShowRemoteFrame", OTHER);
   NS_ASSERTION(IsRemoteFrame(),
                "ShowRemote only makes sense on remote frames.");
 
-  if (!mRemoteBrowser && !mRemoteFrameChild && !TryRemoteBrowser()) {
+  if (!mRemoteBrowser && !mBrowserBridgeChild && !TryRemoteBrowser()) {
     NS_ERROR("Couldn't create child process.");
     return false;
   }
 
   // FIXME/bug 589337: Show()/Hide() is pretty expensive for
   // cross-process layers; need to figure out what behavior we really
   // want here.  For now, hack.
   if (!mRemoteBrowserShown) {
@@ -820,26 +820,26 @@ bool nsFrameLoader::ShowRemoteFrame(cons
     }
 
     // We never want to host remote frameloaders in simple popups, like menus.
     nsIWidget* widget = nsContentUtils::WidgetForContent(mOwnerContent);
     if (!widget || static_cast<nsBaseWidget*>(widget)->IsSmallPopup()) {
       return false;
     }
 
-    if (mRemoteFrameChild) {
+    if (mBrowserBridgeChild) {
       nsCOMPtr<nsISupports> container =
           mOwnerContent->OwnerDoc()->GetContainer();
       nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(container);
       nsCOMPtr<nsIWidget> mainWidget;
       baseWindow->GetMainWidget(getter_AddRefs(mainWidget));
       nsSizeMode sizeMode =
           mainWidget ? mainWidget->SizeMode() : nsSizeMode_Normal;
 
-      Unused << mRemoteFrameChild->SendShow(
+      Unused << mBrowserBridgeChild->SendShow(
           size, ParentWindowIsActive(mOwnerContent->OwnerDoc()), sizeMode);
       mRemoteBrowserShown = true;
       return true;
     }
 
     RenderFrame* rf =
         mRemoteBrowser ? mRemoteBrowser->GetRenderFrame() : nullptr;
 
@@ -858,18 +858,18 @@ bool nsFrameLoader::ShowRemoteFrame(cons
   } else {
     nsIntRect dimensions;
     NS_ENSURE_SUCCESS(GetWindowDimensions(dimensions), false);
 
     // Don't show remote iframe if we are waiting for the completion of reflow.
     if (!aFrame || !(aFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
       if (mRemoteBrowser) {
         mRemoteBrowser->UpdateDimensions(dimensions, size);
-      } else if (mRemoteFrameChild) {
-        mRemoteFrameChild->UpdateDimensions(dimensions, size);
+      } else if (mBrowserBridgeChild) {
+        mBrowserBridgeChild->UpdateDimensions(dimensions, size);
       }
     }
   }
 
   return true;
 }
 
 void nsFrameLoader::Hide() {
@@ -950,17 +950,17 @@ nsresult nsFrameLoader::SwapWithOtherRem
 
   nsIPresShell* ourShell = ourDoc->GetShell();
   nsIPresShell* otherShell = otherDoc->GetShell();
   if (!ourShell || !otherShell) {
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
   // FIXME: Consider supporting FrameLoader swapping for remote sub frames.
-  if (mRemoteFrameChild) {
+  if (mBrowserBridgeChild) {
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
   if (!mRemoteBrowser || !aOther->mRemoteBrowser) {
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
   if (mRemoteBrowser->IsIsolatedMozBrowserElement() !=
@@ -1681,19 +1681,19 @@ void nsFrameLoader::DestroyDocShell() {
 
   // Ask the TabChild to fire the frame script "unload" event, destroy its
   // docshell, and finally destroy the PBrowser actor. This eventually leads to
   // nsFrameLoader::DestroyComplete being called.
   if (mRemoteBrowser) {
     mRemoteBrowser->Destroy();
   }
 
-  if (mRemoteFrameChild) {
-    Unused << mRemoteFrameChild->Send__delete__(mRemoteFrameChild);
-    mRemoteFrameChild = nullptr;
+  if (mBrowserBridgeChild) {
+    Unused << mBrowserBridgeChild->Send__delete__(mBrowserBridgeChild);
+    mBrowserBridgeChild = nullptr;
   }
 
   // Fire the "unload" event if we're in-process.
   if (mChildMessageManager) {
     mChildMessageManager->FireUnloadEvent();
   }
 
   // Destroy the docshell.
@@ -1727,19 +1727,19 @@ void nsFrameLoader::DestroyComplete() {
 
   // Call TabParent::Destroy if we haven't already (in case of a crash).
   if (mRemoteBrowser) {
     mRemoteBrowser->SetOwnerElement(nullptr);
     mRemoteBrowser->Destroy();
     mRemoteBrowser = nullptr;
   }
 
-  if (mRemoteFrameChild) {
-    Unused << mRemoteFrameChild->Send__delete__(mRemoteFrameChild);
-    mRemoteFrameChild = nullptr;
+  if (mBrowserBridgeChild) {
+    Unused << mBrowserBridgeChild->Send__delete__(mBrowserBridgeChild);
+    mBrowserBridgeChild = nullptr;
   }
 
   if (mMessageManager) {
     mMessageManager->Disconnect();
   }
 
   if (mChildMessageManager) {
     mChildMessageManager->Disconnect();
@@ -2293,30 +2293,30 @@ nsresult nsFrameLoader::GetWindowDimensi
   nsCOMPtr<nsIBaseWindow> treeOwnerAsWin(do_GetInterface(parentOwner));
   treeOwnerAsWin->GetPosition(&aRect.x, &aRect.y);
   treeOwnerAsWin->GetSize(&aRect.width, &aRect.height);
   return NS_OK;
 }
 
 nsresult nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame* aIFrame) {
   if (IsRemoteFrame()) {
-    if (mRemoteBrowser || mRemoteFrameChild) {
+    if (mRemoteBrowser || mBrowserBridgeChild) {
       ScreenIntSize size = aIFrame->GetSubdocumentSize();
       // If we were not able to show remote frame before, we should probably
       // retry now to send correct showInfo.
       if (!mRemoteBrowserShown) {
         ShowRemoteFrame(size, aIFrame);
       }
       nsIntRect dimensions;
       NS_ENSURE_SUCCESS(GetWindowDimensions(dimensions), NS_ERROR_FAILURE);
       mLazySize = size;
       if (mRemoteBrowser) {
         mRemoteBrowser->UpdateDimensions(dimensions, size);
-      } else if (mRemoteFrameChild) {
-        mRemoteFrameChild->UpdateDimensions(dimensions, size);
+      } else if (mBrowserBridgeChild) {
+        mBrowserBridgeChild->UpdateDimensions(dimensions, size);
       }
     }
     return NS_OK;
   }
   UpdateBaseWindowPositionAndSize(aIFrame);
   return NS_OK;
 }
 
@@ -2386,17 +2386,17 @@ static Tuple<ContentParent*, TabParent*>
   if (tabParent && tabParent->Manager()) {
     return MakeTuple(tabParent->Manager(), tabParent);
   }
 
   return ReturnTuple(nullptr, nullptr);
 }
 
 bool nsFrameLoader::TryRemoteBrowser() {
-  NS_ASSERTION(!mRemoteBrowser && !mRemoteFrameChild,
+  NS_ASSERTION(!mRemoteBrowser && !mBrowserBridgeChild,
                "TryRemoteBrowser called with a remote browser already?");
 
   if (!mOwnerContent) {
     return false;
   }
 
   // XXXsmaug Per spec (2014/08/21) frameloader should not work in case the
   //         element isn't in document, only in shadow dom, but that will change
@@ -2503,21 +2503,21 @@ bool nsFrameLoader::TryRemoteBrowser() {
     // nsIBrowserDOMWindow API as a backup.
     if (!nextTabParentId && window) {
       Unused << window->GetNextTabParentId(&nextTabParentId);
     }
   }
 
   nsCOMPtr<Element> ownerElement = mOwnerContent;
 
-  // If we're in a content process, create a RemoteFrameChild actor.
+  // If we're in a content process, create a BrowserBridgeChild actor.
   if (XRE_IsContentProcess()) {
-    mRemoteFrameChild = RemoteFrameChild::Create(
+    mBrowserBridgeChild = BrowserBridgeChild::Create(
         this, context, NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE));
-    return !!mRemoteFrameChild;
+    return !!mBrowserBridgeChild;
   }
 
   mRemoteBrowser =
       ContentParent::CreateBrowser(context, ownerElement, openerContentParent,
                                    sameTabGroupAs, nextTabParentId);
   if (!mRemoteBrowser) {
     return false;
   }
@@ -2581,27 +2581,27 @@ bool nsFrameLoader::IsRemoteFrame() {
   }
   return false;
 }
 
 mozilla::dom::PBrowserParent* nsFrameLoader::GetRemoteBrowser() const {
   return mRemoteBrowser;
 }
 
-mozilla::dom::RemoteFrameChild* nsFrameLoader::GetRemoteFrameChild() const {
-  return mRemoteFrameChild;
+mozilla::dom::BrowserBridgeChild* nsFrameLoader::GetBrowserBridgeChild() const {
+  return mBrowserBridgeChild;
 }
 
 mozilla::layers::LayersId nsFrameLoader::GetLayersId() const {
   MOZ_ASSERT(mRemoteFrame);
   if (mRemoteBrowser) {
     return mRemoteBrowser->GetRenderFrame()->GetLayersId();
   }
-  if (mRemoteFrameChild) {
-    return mRemoteFrameChild->GetLayersId();
+  if (mBrowserBridgeChild) {
+    return mBrowserBridgeChild->GetLayersId();
   }
   return mozilla::layers::LayersId{};
 }
 
 void nsFrameLoader::ActivateRemoteFrame(ErrorResult& aRv) {
   if (!mRemoteBrowser) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return;
--- a/dom/base/nsFrameLoader.h
+++ b/dom/base/nsFrameLoader.h
@@ -54,17 +54,17 @@ class ChromeMessageSender;
 class ContentParent;
 class InProcessTabChildMessageManager;
 class MessageSender;
 class PBrowserParent;
 class ProcessMessageManager;
 class Promise;
 class TabParent;
 class MutableTabContext;
-class RemoteFrameChild;
+class BrowserBridgeChild;
 
 namespace ipc {
 class StructuredCloneData;
 }  // namespace ipc
 
 }  // namespace dom
 
 namespace layout {
@@ -278,20 +278,20 @@ class nsFrameLoader final : public nsStu
 
   /**
    * Returns the IPDL actor used if this is a top-level remote browser, or null
    * otherwise.
    */
   PBrowserParent* GetRemoteBrowser() const;
 
   /**
-   * Returns the RemoteFrameChild if this is an out-of-process iframe, or null
+   * Returns the BrowserBridgeChild if this is an out-of-process iframe, or null
    * otherwise.
    */
-  mozilla::dom::RemoteFrameChild* GetRemoteFrameChild() const;
+  mozilla::dom::BrowserBridgeChild* GetBrowserBridgeChild() const;
 
   /**
    * Returns the layers ID that this remote frame is using to render.
    *
    * This must only be called if this is a remote frame.
    */
   mozilla::layers::LayersId GetLayersId() const;
 
@@ -450,17 +450,17 @@ class nsFrameLoader final : public nsStu
 
   // An opener window which should be used when the docshell is created.
   nsCOMPtr<nsPIDOMWindowOuter> mOpener;
 
   TabParent* mRemoteBrowser;
   uint64_t mChildID;
 
   // This is used when this refers to a remote sub frame
-  RefPtr<mozilla::dom::RemoteFrameChild> mRemoteFrameChild;
+  RefPtr<mozilla::dom::BrowserBridgeChild> mBrowserBridgeChild;
 
   // Holds the last known size of the frame.
   mozilla::ScreenIntSize mLazySize;
 
   RefPtr<mozilla::dom::ParentSHistory> mParentSHistory;
 
   bool mDepthTooGreat : 1;
   bool mIsTopLevelContent : 1;
rename from dom/ipc/RemoteFrameChild.cpp
rename to dom/ipc/BrowserBridgeChild.cpp
--- a/dom/ipc/RemoteFrameChild.cpp
+++ b/dom/ipc/BrowserBridgeChild.cpp
@@ -1,55 +1,57 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/dom/RemoteFrameChild.h"
-
+#include "mozilla/dom/BrowserBridgeChild.h"
+#include "nsFrameLoader.h"
 #include "nsFrameLoaderOwner.h"
+#include "nsQueryObject.h"
 
 using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace dom {
 
-RemoteFrameChild::RemoteFrameChild(nsFrameLoader* aFrameLoader)
+BrowserBridgeChild::BrowserBridgeChild(nsFrameLoader* aFrameLoader)
     : mLayersId{0}, mIPCOpen(true), mFrameLoader(aFrameLoader) {}
 
-RemoteFrameChild::~RemoteFrameChild() {}
+BrowserBridgeChild::~BrowserBridgeChild() {}
 
-already_AddRefed<RemoteFrameChild> RemoteFrameChild::Create(
+already_AddRefed<BrowserBridgeChild> BrowserBridgeChild::Create(
     nsFrameLoader* aFrameLoader, const TabContext& aContext,
     const nsString& aRemoteType) {
   MOZ_ASSERT(XRE_IsContentProcess());
 
   // Determine our embedder's TabChild actor.
   RefPtr<Element> owner = aFrameLoader->GetOwnerContent();
   MOZ_DIAGNOSTIC_ASSERT(owner);
 
   nsCOMPtr<nsIDocShell> docShell = do_GetInterface(owner->GetOwnerGlobal());
   MOZ_DIAGNOSTIC_ASSERT(docShell);
 
   RefPtr<TabChild> tabChild = TabChild::GetFrom(docShell);
   MOZ_DIAGNOSTIC_ASSERT(tabChild);
 
-  RefPtr<RemoteFrameChild> remoteFrame = new RemoteFrameChild(aFrameLoader);
-  // Reference is freed in TabChild::DeallocPRemoteFrameChild.
-  tabChild->SendPRemoteFrameConstructor(
-      do_AddRef(remoteFrame).take(),
+  RefPtr<BrowserBridgeChild> browserBridge =
+      new BrowserBridgeChild(aFrameLoader);
+  // Reference is freed in TabChild::DeallocPBrowserBridgeChild.
+  tabChild->SendPBrowserBridgeConstructor(
+      do_AddRef(browserBridge).take(),
       PromiseFlatString(aContext.PresentationURL()), aRemoteType);
-  remoteFrame->mIPCOpen = true;
+  browserBridge->mIPCOpen = true;
 
-  return remoteFrame.forget();
+  return browserBridge.forget();
 }
 
-void RemoteFrameChild::UpdateDimensions(const nsIntRect& aRect,
-                                        const mozilla::ScreenIntSize& aSize) {
+void BrowserBridgeChild::UpdateDimensions(const nsIntRect& aRect,
+                                          const mozilla::ScreenIntSize& aSize) {
   MOZ_DIAGNOSTIC_ASSERT(mIPCOpen);
 
   RefPtr<Element> owner = mFrameLoader->GetOwnerContent();
   nsCOMPtr<nsIWidget> widget = nsContentUtils::WidgetForContent(owner);
   if (!widget) {
     widget = nsContentUtils::WidgetForDocument(owner->OwnerDoc());
   }
   MOZ_DIAGNOSTIC_ASSERT(widget);
@@ -70,46 +72,46 @@ void RemoteFrameChild::UpdateDimensions(
   CSSSize unscaledSize = devicePixelSize / widgetScale;
   hal::ScreenOrientation orientation = hal::eScreenOrientation_Default;
   DimensionInfo di(unscaledRect, unscaledSize, orientation, clientOffset,
                    chromeOffset);
 
   Unused << SendUpdateDimensions(di);
 }
 
-void RemoteFrameChild::NavigateByKey(bool aForward,
-                                     bool aForDocumentNavigation) {
+void BrowserBridgeChild::NavigateByKey(bool aForward,
+                                       bool aForDocumentNavigation) {
   Unused << SendNavigateByKey(aForward, aForDocumentNavigation);
 }
 
-void RemoteFrameChild::Activate() { Unused << SendActivate(); }
+void BrowserBridgeChild::Activate() { Unused << SendActivate(); }
 
 /*static*/
-RemoteFrameChild* RemoteFrameChild::GetFrom(nsFrameLoader* aFrameLoader) {
+BrowserBridgeChild* BrowserBridgeChild::GetFrom(nsFrameLoader* aFrameLoader) {
   if (!aFrameLoader) {
     return nullptr;
   }
-  return aFrameLoader->GetRemoteFrameChild();
+  return aFrameLoader->GetBrowserBridgeChild();
 }
 
 /*static*/
-RemoteFrameChild* RemoteFrameChild::GetFrom(nsIContent* aContent) {
+BrowserBridgeChild* BrowserBridgeChild::GetFrom(nsIContent* aContent) {
   RefPtr<nsFrameLoaderOwner> loaderOwner = do_QueryObject(aContent);
   if (!loaderOwner) {
     return nullptr;
   }
   RefPtr<nsFrameLoader> frameLoader = loaderOwner->GetFrameLoader();
   return GetFrom(frameLoader);
 }
 
-IPCResult RemoteFrameChild::RecvSetLayersId(
+IPCResult BrowserBridgeChild::RecvSetLayersId(
     const mozilla::layers::LayersId& aLayersId) {
   MOZ_ASSERT(!mLayersId.IsValid() && aLayersId.IsValid());
   mLayersId = aLayersId;
   return IPC_OK();
 }
 
-void RemoteFrameChild::ActorDestroy(ActorDestroyReason aWhy) {
+void BrowserBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
   mIPCOpen = false;
 }
 
 }  // namespace dom
 }  // namespace mozilla
rename from dom/ipc/RemoteFrameChild.h
rename to dom/ipc/BrowserBridgeChild.h
--- a/dom/ipc/RemoteFrameChild.h
+++ b/dom/ipc/BrowserBridgeChild.h
@@ -1,65 +1,65 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_RemoteFrameChild_h
-#define mozilla_dom_RemoteFrameChild_h
+#ifndef mozilla_dom_BrowserBridgeChild_h
+#define mozilla_dom_BrowserBridgeChild_h
 
-#include "mozilla/dom/PRemoteFrameChild.h"
+#include "mozilla/dom/PBrowserBridgeChild.h"
 #include "mozilla/dom/TabChild.h"
 
 namespace mozilla {
 namespace dom {
 
 /**
  * Child side for a remote frame.
  */
-class RemoteFrameChild : public PRemoteFrameChild {
+class BrowserBridgeChild : public PBrowserBridgeChild {
  public:
-  NS_INLINE_DECL_REFCOUNTING(RemoteFrameChild);
+  NS_INLINE_DECL_REFCOUNTING(BrowserBridgeChild);
 
   TabChild* Manager() {
     MOZ_ASSERT(mIPCOpen);
-    return static_cast<TabChild*>(PRemoteFrameChild::Manager());
+    return static_cast<TabChild*>(PBrowserBridgeChild::Manager());
   }
 
   mozilla::layers::LayersId GetLayersId() { return mLayersId; }
 
-  static already_AddRefed<RemoteFrameChild> Create(nsFrameLoader* aFrameLoader,
-                                                   const TabContext& aContext,
-                                                   const nsString& aRemoteType);
+  static already_AddRefed<BrowserBridgeChild> Create(
+      nsFrameLoader* aFrameLoader, const TabContext& aContext,
+      const nsString& aRemoteType);
 
   void UpdateDimensions(const nsIntRect& aRect,
                         const mozilla::ScreenIntSize& aSize);
 
   void NavigateByKey(bool aForward, bool aForDocumentNavigation);
 
   void Activate();
 
-  static RemoteFrameChild* GetFrom(nsFrameLoader* aFrameLoader);
+  static BrowserBridgeChild* GetFrom(nsFrameLoader* aFrameLoader);
 
-  static RemoteFrameChild* GetFrom(nsIContent* aContent);
+  static BrowserBridgeChild* GetFrom(nsIContent* aContent);
 
  protected:
-  friend class PRemoteFrameChild;
+  friend class PBrowserBridgeChild;
 
   mozilla::ipc::IPCResult RecvSetLayersId(
       const mozilla::layers::LayersId& aLayersId);
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
-  explicit RemoteFrameChild(nsFrameLoader* aFrameLoader);
-  ~RemoteFrameChild();
+  explicit BrowserBridgeChild(nsFrameLoader* aFrameLoader);
+  ~BrowserBridgeChild();
 
   mozilla::layers::LayersId mLayersId;
   bool mIPCOpen;
   RefPtr<nsFrameLoader> mFrameLoader;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // !defined(mozilla_dom_RemoteFrameParent_h)
+#endif  // !defined(mozilla_dom_BrowserBridgeParent_h)
rename from dom/ipc/RemoteFrameParent.cpp
rename to dom/ipc/BrowserBridgeParent.cpp
--- a/dom/ipc/RemoteFrameParent.cpp
+++ b/dom/ipc/BrowserBridgeParent.cpp
@@ -1,30 +1,31 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/dom/RemoteFrameParent.h"
+#include "mozilla/dom/BrowserBridgeParent.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ContentProcessManager.h"
 
 using namespace mozilla::ipc;
 using namespace mozilla::layout;
+using namespace mozilla::hal;
 
 namespace mozilla {
 namespace dom {
 
-RemoteFrameParent::RemoteFrameParent() : mIPCOpen(false) {}
+BrowserBridgeParent::BrowserBridgeParent() : mIPCOpen(false) {}
 
-RemoteFrameParent::~RemoteFrameParent() {}
+BrowserBridgeParent::~BrowserBridgeParent() {}
 
-nsresult RemoteFrameParent::Init(const nsString& aPresentationURL,
-                                 const nsString& aRemoteType) {
+nsresult BrowserBridgeParent::Init(const nsString& aPresentationURL,
+                                   const nsString& aRemoteType) {
   mIPCOpen = true;
 
   // FIXME: This should actually use a non-bogus TabContext, probably inherited
   // from our Manager().
   OriginAttributes attrs;
   attrs.mInIsolatedMozBrowser = false;
   attrs.mAppId = nsIScriptSecurityManager::NO_APP_ID;
   attrs.SyncAttributesWithPrivateBrowsing(false);
@@ -75,56 +76,56 @@ nsresult RemoteFrameParent::Init(const n
     return NS_ERROR_FAILURE;
   }
 
   // Send the newly created layers ID back into content.
   Unused << SendSetLayersId(rf->GetLayersId());
   return NS_OK;
 }
 
-IPCResult RemoteFrameParent::RecvShow(const ScreenIntSize& aSize,
-                                      const bool& aParentIsActive,
-                                      const nsSizeMode& aSizeMode) {
+IPCResult BrowserBridgeParent::RecvShow(const ScreenIntSize& aSize,
+                                        const bool& aParentIsActive,
+                                        const nsSizeMode& aSizeMode) {
   RenderFrame* rf = mTabParent->GetRenderFrame();
   if (!rf->AttachLayerManager()) {
     MOZ_CRASH();
   }
 
   Unused << mTabParent->SendShow(aSize, mTabParent->GetShowInfo(),
                                  aParentIsActive, aSizeMode);
   return IPC_OK();
 }
 
-IPCResult RemoteFrameParent::RecvLoadURL(const nsCString& aUrl) {
+IPCResult BrowserBridgeParent::RecvLoadURL(const nsCString& aUrl) {
   Unused << mTabParent->SendLoadURL(aUrl, mTabParent->GetShowInfo());
   return IPC_OK();
 }
 
-IPCResult RemoteFrameParent::RecvUpdateDimensions(
+IPCResult BrowserBridgeParent::RecvUpdateDimensions(
     const DimensionInfo& aDimensions) {
   Unused << mTabParent->SendUpdateDimensions(aDimensions);
   return IPC_OK();
 }
 
-IPCResult RemoteFrameParent::RecvRenderLayers(
+IPCResult BrowserBridgeParent::RecvRenderLayers(
     const bool& aEnabled, const bool& aForceRepaint,
     const layers::LayersObserverEpoch& aEpoch) {
   Unused << mTabParent->SendRenderLayers(aEnabled, aForceRepaint, aEpoch);
   return IPC_OK();
 }
 
-IPCResult RemoteFrameParent::RecvNavigateByKey(
+IPCResult BrowserBridgeParent::RecvNavigateByKey(
     const bool& aForward, const bool& aForDocumentNavigation) {
   Unused << mTabParent->SendNavigateByKey(aForward, aForDocumentNavigation);
   return IPC_OK();
 }
 
-IPCResult RemoteFrameParent::RecvActivate() {
+IPCResult BrowserBridgeParent::RecvActivate() {
   mTabParent->Activate();
   return IPC_OK();
 }
 
-void RemoteFrameParent::ActorDestroy(ActorDestroyReason aWhy) {
+void BrowserBridgeParent::ActorDestroy(ActorDestroyReason aWhy) {
   mIPCOpen = false;
 }
 
 }  // namespace dom
 }  // namespace mozilla
rename from dom/ipc/RemoteFrameParent.h
rename to dom/ipc/BrowserBridgeParent.h
--- a/dom/ipc/RemoteFrameParent.h
+++ b/dom/ipc/BrowserBridgeParent.h
@@ -1,42 +1,42 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_RemoteFrameParent_h
-#define mozilla_dom_RemoteFrameParent_h
+#ifndef mozilla_dom_BrowserBridgeParent_h
+#define mozilla_dom_BrowserBridgeParent_h
 
-#include "mozilla/dom/PRemoteFrameParent.h"
+#include "mozilla/dom/PBrowserBridgeParent.h"
 #include "mozilla/dom/TabParent.h"
 
 namespace mozilla {
 namespace dom {
 
-class RemoteFrameParent : public PRemoteFrameParent {
+class BrowserBridgeParent : public PBrowserBridgeParent {
  public:
-  NS_INLINE_DECL_REFCOUNTING(RemoteFrameParent);
+  NS_INLINE_DECL_REFCOUNTING(BrowserBridgeParent);
 
-  RemoteFrameParent();
+  BrowserBridgeParent();
 
   // Initialize this actor after performing startup.
   nsresult Init(const nsString& aPresentationURL, const nsString& aRemoteType);
 
   TabParent* GetTabParent() { return mTabParent; }
 
   // Get our manager actor.
   TabParent* Manager() {
     MOZ_ASSERT(mIPCOpen);
-    return static_cast<TabParent*>(PRemoteFrameParent::Manager());
+    return static_cast<TabParent*>(PBrowserBridgeParent::Manager());
   }
 
  protected:
-  friend class PRemoteFrameParent;
+  friend class PBrowserBridgeParent;
 
   mozilla::ipc::IPCResult RecvShow(const ScreenIntSize& aSize,
                                    const bool& aParentIsActive,
                                    const nsSizeMode& aSizeMode);
   mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aUrl);
   mozilla::ipc::IPCResult RecvUpdateDimensions(
       const DimensionInfo& aDimensions);
   mozilla::ipc::IPCResult RecvRenderLayers(const bool& aEnabled,
@@ -46,18 +46,18 @@ class RemoteFrameParent : public PRemote
   mozilla::ipc::IPCResult RecvNavigateByKey(const bool& aForward,
                                             const bool& aForDocumentNavigation);
 
   mozilla::ipc::IPCResult RecvActivate();
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
-  ~RemoteFrameParent();
+  ~BrowserBridgeParent();
 
   RefPtr<TabParent> mTabParent;
   bool mIPCOpen;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // !defined(mozilla_dom_RemoteFrameParent_h)
+#endif  // !defined(mozilla_dom_BrowserBridgeParent_h)
--- a/dom/ipc/MemoryReportRequest.cpp
+++ b/dom/ipc/MemoryReportRequest.cpp
@@ -1,18 +1,21 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsMemoryReporterManager.h"
 #include "MemoryReportRequest.h"
+#include "mozilla/ipc/FileDescriptor.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 
+using namespace mozilla::ipc;
+
 namespace mozilla {
 namespace dom {
 
 MemoryReportRequestHost::MemoryReportRequestHost(uint32_t aGeneration)
     : mGeneration(aGeneration), mSuccess(false) {
   MOZ_COUNT_CTOR(MemoryReportRequestHost);
   mReporterManager = nsMemoryReporterManager::GetOrCreate();
   NS_WARNING_ASSERTION(mReporterManager, "GetOrCreate failed");
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -13,17 +13,17 @@ include protocol PIndexedDBPermissionReq
 include protocol PPluginWidget;
 include protocol PRemotePrintJob;
 include protocol PChildToParentStream;
 include protocol PParentToChildStream;
 include protocol PFileDescriptorSet;
 include protocol PIPCBlobInputStream;
 include protocol PPaymentRequest;
 include protocol PWindowGlobal;
-include protocol PRemoteFrame;
+include protocol PBrowserBridge;
 
 include DOMTypes;
 include IPCBlob;
 include IPCStream;
 include JavaScriptTypes;
 include URIParams;
 include PPrintingTypes;
 include PTabContext;
@@ -137,17 +137,17 @@ nested(upto inside_cpow) sync protocol P
 
     manages PColorPicker;
     manages PDocAccessible;
     manages PFilePicker;
     manages PIndexedDBPermissionRequest;
     manages PPluginWidget;
     manages PPaymentRequest;
     manages PWindowGlobal;
-    manages PRemoteFrame;
+    manages PBrowserBridge;
 
 both:
     async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
                        Principal aPrincipal, ClonedMessageData aData);
 
 parent:
     /**
      * Tell the parent process a new accessible document has been created.
@@ -173,17 +173,17 @@ parent:
      * Construct a new WindowGlobal actor for a window global in the given
      * BrowsingContext and with the given principal.
      */
     async PWindowGlobal(WindowGlobalInit init);
 
     /**
      * Construct a new Remote iframe actor.
      */
-    async PRemoteFrame(nsString aPresentationURL, nsString aRemoteType);
+    async PBrowserBridge(nsString aPresentationURL, nsString aRemoteType);
 
     /**
      * Sends an NS_NATIVE_CHILD_OF_SHAREABLE_WINDOW to be adopted by the
      * widget's shareable window on the chrome side. Only used on Windows.
      */
     async SetNativeChildOfShareableWindow(uintptr_t childWindow);
 
     /**
rename from dom/ipc/PRemoteFrame.ipdl
rename to dom/ipc/PBrowserBridge.ipdl
--- a/dom/ipc/PRemoteFrame.ipdl
+++ b/dom/ipc/PBrowserBridge.ipdl
@@ -12,19 +12,19 @@ using ScreenIntSize from "Units.h";
 using nsSizeMode from "nsIWidgetListener.h";
 using mozilla::layers::LayersObserverEpoch from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
 
 namespace mozilla {
 namespace dom {
 
 /**
- * PRemoteFrame corresponds to a remote iframe.
+ * PBrowserBridge corresponds to a remote iframe.
  */
-async protocol PRemoteFrame {
+async protocol PBrowserBridge {
   manager PBrowser;
 
 child:
   async SetLayersId(LayersId layersId);
 
 parent:
   // Destroy the remote web browser due to the nsFrameLoader going away.
   async __delete__();
--- a/dom/ipc/PermissionMessageUtils.cpp
+++ b/dom/ipc/PermissionMessageUtils.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/ipc/BackgroundUtils.h"
+#include "mozilla/ipc/PBackgroundSharedTypes.h"
 
 namespace mozilla {
 namespace ipc {
 
 void IPDLParamTraits<nsIPrincipal>::Write(IPC::Message* aMsg, IProtocol* aActor,
                                           nsIPrincipal* aParam) {
   MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());
 
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -25,17 +25,17 @@
 #include "mozilla/dom/indexedDB/PIndexedDBPermissionRequestChild.h"
 #include "mozilla/dom/LoadURIOptionsBinding.h"
 #include "mozilla/dom/MessageManagerBinding.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/Nullable.h"
 #include "mozilla/dom/PaymentRequestChild.h"
 #include "mozilla/dom/PBrowser.h"
 #include "mozilla/dom/WindowProxyHolder.h"
-#include "mozilla/dom/RemoteFrameChild.h"
+#include "mozilla/dom/BrowserBridgeChild.h"
 #include "mozilla/gfx/CrossProcessPaint.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "mozilla/layers/APZChild.h"
 #include "mozilla/layers/APZCCallbackHelper.h"
 #include "mozilla/layers/APZCTreeManagerChild.h"
 #include "mozilla/layers/APZEventState.h"
 #include "mozilla/layers/ContentProcessController.h"
@@ -3190,25 +3190,26 @@ PWindowGlobalChild* TabChild::AllocPWind
 }
 
 bool TabChild::DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) {
   // This reference was added in WindowGlobalChild::Create.
   static_cast<WindowGlobalChild*>(aActor)->Release();
   return true;
 }
 
-PRemoteFrameChild* TabChild::AllocPRemoteFrameChild(const nsString&,
-                                                    const nsString&) {
-  MOZ_CRASH("We should never be manually allocating PRemoteFrameChild actors");
+PBrowserBridgeChild* TabChild::AllocPBrowserBridgeChild(const nsString&,
+                                                        const nsString&) {
+  MOZ_CRASH(
+      "We should never be manually allocating PBrowserBridgeChild actors");
   return nullptr;
 }
 
-bool TabChild::DeallocPRemoteFrameChild(PRemoteFrameChild* aActor) {
-  // This reference was added in RemoteFrameChild::Create.
-  static_cast<RemoteFrameChild*>(aActor)->Release();
+bool TabChild::DeallocPBrowserBridgeChild(PBrowserBridgeChild* aActor) {
+  // This reference was added in BrowserBridgeChild::Create.
+  static_cast<BrowserBridgeChild*>(aActor)->Release();
   return true;
 }
 
 ScreenIntSize TabChild::GetInnerSize() {
   LayoutDeviceIntSize innerSize =
       RoundedToInt(mUnscaledInnerSize * mPuppetWidget->GetDefaultScale());
   return ViewAs<ScreenPixel>(
       innerSize, PixelCastJustification::LayoutDeviceIsScreenForTabDims);
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -665,20 +665,20 @@ class TabChild final : public TabChildBa
  protected:
   virtual ~TabChild();
 
   virtual PWindowGlobalChild* AllocPWindowGlobalChild(
       const WindowGlobalInit& aInit) override;
 
   virtual bool DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) override;
 
-  virtual PRemoteFrameChild* AllocPRemoteFrameChild(
+  virtual PBrowserBridgeChild* AllocPBrowserBridgeChild(
       const nsString& aName, const nsString& aRemoteType) override;
 
-  virtual bool DeallocPRemoteFrameChild(PRemoteFrameChild* aActor) override;
+  virtual bool DeallocPBrowserBridgeChild(PBrowserBridgeChild* aActor) override;
 
   virtual mozilla::ipc::IPCResult RecvDestroy() override;
 
   virtual mozilla::ipc::IPCResult RecvSetDocShellIsActive(
       const bool& aIsActive) override;
 
   virtual mozilla::ipc::IPCResult RecvRenderLayers(
       const bool& aEnabled, const bool& aForce,
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -16,17 +16,17 @@
 #include "mozilla/dom/ChromeMessageSender.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/DataTransferItemList.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/PaymentRequestParent.h"
-#include "mozilla/dom/RemoteFrameParent.h"
+#include "mozilla/dom/BrowserBridgeParent.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/DataSurfaceHelpers.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/Hal.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/AsyncDragMetrics.h"
@@ -993,32 +993,32 @@ PWindowGlobalParent* TabParent::AllocPWi
 }
 
 bool TabParent::DeallocPWindowGlobalParent(PWindowGlobalParent* aActor) {
   // Free reference from AllocPWindowGlobalParent.
   static_cast<WindowGlobalParent*>(aActor)->Release();
   return true;
 }
 
-IPCResult TabParent::RecvPRemoteFrameConstructor(PRemoteFrameParent* aActor,
-                                                 const nsString& aName,
-                                                 const nsString& aRemoteType) {
-  static_cast<RemoteFrameParent*>(aActor)->Init(aName, aRemoteType);
+IPCResult TabParent::RecvPBrowserBridgeConstructor(
+    PBrowserBridgeParent* aActor, const nsString& aName,
+    const nsString& aRemoteType) {
+  static_cast<BrowserBridgeParent*>(aActor)->Init(aName, aRemoteType);
   return IPC_OK();
 }
 
-PRemoteFrameParent* TabParent::AllocPRemoteFrameParent(
+PBrowserBridgeParent* TabParent::AllocPBrowserBridgeParent(
     const nsString& aName, const nsString& aRemoteType) {
-  // Reference freed in DeallocPRemoteFrameParent.
-  return do_AddRef(new RemoteFrameParent()).take();
+  // Reference freed in DeallocPBrowserBridgeParent.
+  return do_AddRef(new BrowserBridgeParent()).take();
 }
 
-bool TabParent::DeallocPRemoteFrameParent(PRemoteFrameParent* aActor) {
-  // Free reference from AllocPRemoteFrameParent.
-  static_cast<RemoteFrameParent*>(aActor)->Release();
+bool TabParent::DeallocPBrowserBridgeParent(PBrowserBridgeParent* aActor) {
+  // Free reference from AllocPBrowserBridgeParent.
+  static_cast<BrowserBridgeParent*>(aActor)->Release();
   return true;
 }
 
 void TabParent::SendMouseEvent(const nsAString& aType, float aX, float aY,
                                int32_t aButton, int32_t aClickCount,
                                int32_t aModifiers,
                                bool aIgnoreRootScrollFrame) {
   if (!mIsDestroyed) {
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -310,23 +310,23 @@ class TabParent final : public PBrowserP
 
   PWindowGlobalParent* AllocPWindowGlobalParent(const WindowGlobalInit& aInit);
 
   bool DeallocPWindowGlobalParent(PWindowGlobalParent* aActor);
 
   virtual mozilla::ipc::IPCResult RecvPWindowGlobalConstructor(
       PWindowGlobalParent* aActor, const WindowGlobalInit& aInit) override;
 
-  PRemoteFrameParent* AllocPRemoteFrameParent(const nsString& aPresentationURL,
-                                              const nsString& aRemoteType);
+  PBrowserBridgeParent* AllocPBrowserBridgeParent(
+      const nsString& aPresentationURL, const nsString& aRemoteType);
 
-  bool DeallocPRemoteFrameParent(PRemoteFrameParent* aActor);
+  bool DeallocPBrowserBridgeParent(PBrowserBridgeParent* aActor);
 
-  virtual mozilla::ipc::IPCResult RecvPRemoteFrameConstructor(
-      PRemoteFrameParent* aActor, const nsString& aPresentationURL,
+  virtual mozilla::ipc::IPCResult RecvPBrowserBridgeConstructor(
+      PBrowserBridgeParent* aActor, const nsString& aPresentationURL,
       const nsString& aRemoteType) override;
 
   void LoadURL(nsIURI* aURI);
 
   void InitRendering();
   void MaybeShowFrame();
 
   // XXX/cjones: it's not clear what we gain by hiding these
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -23,34 +23,34 @@ EXPORTS.mozilla.dom.ipc += [
     'SharedMap.h',
     'SharedMapChangeEvent.h',
     'SharedStringMap.h',
     'StringTable.h',
     'StructuredCloneData.h',
 ]
 
 EXPORTS.mozilla.dom += [
+    'BrowserBridgeChild.h',
+    'BrowserBridgeParent.h',
     'CoalescedInputData.h',
     'CoalescedMouseData.h',
     'CoalescedWheelData.h',
     'ContentChild.h',
     'ContentParent.h',
     'ContentProcess.h',
     'ContentProcessManager.h',
     'CPOWManagerGetter.h',
     'CSPMessageUtils.h',
     'DocShellMessageUtils.h',
     'FilePickerParent.h',
     'JSWindowActorChild.h',
     'JSWindowActorParent.h',
     'JSWindowActorService.h',
     'MemoryReportRequest.h',
     'PermissionMessageUtils.h',
-    'RemoteFrameChild.h',
-    'RemoteFrameParent.h',
     'TabChild.h',
     'TabContext.h',
     'TabMessageUtils.h',
     'TabParent.h',
     'URLClassifierChild.h',
     'URLClassifierParent.h',
     'WindowGlobalChild.h',
     'WindowGlobalParent.h',
@@ -59,16 +59,18 @@ EXPORTS.mozilla.dom += [
 EXPORTS.mozilla += [
     'PreallocatedProcessManager.h',
     'ProcessHangMonitor.h',
     'ProcessHangMonitorIPC.h',
     'ProcessPriorityManager.h',
 ]
 
 UNIFIED_SOURCES += [
+    'BrowserBridgeChild.cpp',
+    'BrowserBridgeParent.cpp',
     'CoalescedMouseData.cpp',
     'CoalescedWheelData.cpp',
     'ColorPickerParent.cpp',
     'ContentParent.cpp',
     'ContentProcess.cpp',
     'ContentProcessManager.cpp',
     'CSPMessageUtils.cpp',
     'DocShellMessageUtils.cpp',
@@ -77,18 +79,16 @@ UNIFIED_SOURCES += [
     'JSWindowActorParent.cpp',
     'JSWindowActorService.cpp',
     'MemMapSnapshot.cpp',
     'MemoryReportRequest.cpp',
     'MMPrinter.cpp',
     'PermissionMessageUtils.cpp',
     'PreallocatedProcessManager.cpp',
     'ProcessPriorityManager.cpp',
-    'RemoteFrameChild.cpp',
-    'RemoteFrameParent.cpp',
     'SharedMap.cpp',
     'SharedStringMap.cpp',
     'StructuredCloneData.cpp',
     'TabChild.cpp',
     'TabContext.cpp',
     'TabMessageUtils.cpp',
     'TabParent.cpp',
     'URLClassifierParent.cpp',
@@ -101,28 +101,28 @@ SOURCES += [
     'ContentChild.cpp',
     'ProcessHangMonitor.cpp',
 ]
 
 IPDL_SOURCES += [
     'DOMTypes.ipdlh',
     'MemoryReportTypes.ipdlh',
     'PBrowser.ipdl',
+    'PBrowserBridge.ipdl',
     'PBrowserOrId.ipdlh',
     'PColorPicker.ipdl',
     'PContent.ipdl',
     'PContentPermission.ipdlh',
     'PContentPermissionRequest.ipdl',
     'PCycleCollectWithLogs.ipdl',
     'PFilePicker.ipdl',
     'PLoginReputation.ipdl',
     'PPluginWidget.ipdl',
     'PProcessHangMonitor.ipdl',
     'PrefsTypes.ipdlh',
-    'PRemoteFrame.ipdl',
     'PTabContext.ipdlh',
     'PURLClassifier.ipdl',
     'PURLClassifierInfo.ipdlh',
     'PURLClassifierLocal.ipdl',
     'PWindowGlobal.ipdl',
     'ServiceWorkerConfiguration.ipdlh',
 ]
 
--- a/layout/ipc/RenderFrame.cpp
+++ b/layout/ipc/RenderFrame.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/basictypes.h"
 
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/TabParent.h"
-#include "mozilla/dom/RemoteFrameChild.h"
 #include "mozilla/layers/CompositorBridgeParent.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/LayerTransactionParent.h"
 #include "nsFrameLoader.h"
 #include "nsStyleStructInlines.h"
 #include "nsSubDocumentFrame.h"
 #include "RenderFrame.h"
 #include "mozilla/gfx/GPUProcessManager.h"