Bug 1548939 - Move method getters to the top of BrowserParent. r=nika
authorRyan Hunt <rhunt@eqrion.net>
Mon, 29 Apr 2019 17:14:17 -0500
changeset 531704 0214c4b7b50c1f4ab7c8f29ce83666b1fbba91a2
parent 531703 09a84bebb63ffed84b93fcb270a9724d57539b3e
child 531705 63bc837753d653ab13635e432400c1b6d31d12ca
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1548939
milestone68.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 1548939 - Move method getters to the top of BrowserParent. r=nika The next easy step is to move the getters below the static methods. Differential Revision: https://phabricator.services.mozilla.com/D30156
dom/ipc/BrowserParent.cpp
dom/ipc/BrowserParent.h
--- a/dom/ipc/BrowserParent.cpp
+++ b/dom/ipc/BrowserParent.cpp
@@ -310,18 +310,36 @@ void BrowserParent::RemoveBrowserParentF
   }
   sLayerToBrowserParentTable->Remove(uint64_t(aLayersId));
   if (sLayerToBrowserParentTable->Count() == 0) {
     delete sLayerToBrowserParentTable;
     sLayerToBrowserParentTable = nullptr;
   }
 }
 
-void BrowserParent::CacheFrameLoader(nsFrameLoader* aFrameLoader) {
-  mFrameLoader = aFrameLoader;
+already_AddRefed<nsILoadContext> BrowserParent::GetLoadContext() {
+  nsCOMPtr<nsILoadContext> loadContext;
+  if (mLoadContext) {
+    loadContext = mLoadContext;
+  } else {
+    bool isPrivate = mChromeFlags & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW;
+    SetPrivateBrowsingAttributes(isPrivate);
+    bool useTrackingProtection = false;
+    nsCOMPtr<nsIDocShell> docShell = mFrameElement->OwnerDoc()->GetDocShell();
+    if (docShell) {
+      docShell->GetUseTrackingProtection(&useTrackingProtection);
+    }
+    loadContext = new LoadContext(
+        GetOwnerElement(), true /* aIsContent */, isPrivate,
+        mChromeFlags & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW,
+        mChromeFlags & nsIWebBrowserChrome::CHROME_FISSION_WINDOW,
+        useTrackingProtection, OriginAttributesRef());
+    mLoadContext = loadContext;
+  }
+  return loadContext.forget();
 }
 
 /**
  * Will return nullptr if there is no outer window available for the
  * document hosting the owner element of this BrowserParent. Also will return
  * nullptr if that outer window is in the process of closing.
  */
 already_AddRefed<nsPIDOMWindowOuter> BrowserParent::GetParentWindowOuter() {
@@ -333,16 +351,124 @@ already_AddRefed<nsPIDOMWindowOuter> Bro
   nsCOMPtr<nsPIDOMWindowOuter> parent = frame->OwnerDoc()->GetWindow();
   if (!parent || parent->Closed()) {
     return nullptr;
   }
 
   return parent.forget();
 }
 
+already_AddRefed<nsIWidget> BrowserParent::GetTopLevelWidget() {
+  nsCOMPtr<nsIContent> content = mFrameElement;
+  if (content) {
+    PresShell* presShell = content->OwnerDoc()->GetPresShell();
+    if (presShell) {
+      nsViewManager* vm = presShell->GetViewManager();
+      nsCOMPtr<nsIWidget> widget;
+      vm->GetRootWidget(getter_AddRefs(widget));
+      return widget.forget();
+    }
+  }
+  return nullptr;
+}
+
+already_AddRefed<nsIWidget> BrowserParent::GetWidget() const {
+  if (!mFrameElement) {
+    return nullptr;
+  }
+  nsCOMPtr<nsIWidget> widget = nsContentUtils::WidgetForContent(mFrameElement);
+  if (!widget) {
+    widget = nsContentUtils::WidgetForDocument(mFrameElement->OwnerDoc());
+  }
+  return widget.forget();
+}
+
+already_AddRefed<nsIWidget> BrowserParent::GetDocWidget() const {
+  if (!mFrameElement) {
+    return nullptr;
+  }
+  return do_AddRef(
+      nsContentUtils::WidgetForDocument(mFrameElement->OwnerDoc()));
+}
+
+nsIXULBrowserWindow* BrowserParent::GetXULBrowserWindow() {
+  if (!mFrameElement) {
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIDocShell> docShell = mFrameElement->OwnerDoc()->GetDocShell();
+  if (!docShell) {
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
+  docShell->GetTreeOwner(getter_AddRefs(treeOwner));
+  if (!treeOwner) {
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIXULWindow> window = do_GetInterface(treeOwner);
+  if (!window) {
+    return nullptr;
+  }
+
+  nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow;
+  window->GetXULBrowserWindow(getter_AddRefs(xulBrowserWindow));
+  return xulBrowserWindow;
+}
+
+a11y::DocAccessibleParent* BrowserParent::GetTopLevelDocAccessible() const {
+#ifdef ACCESSIBILITY
+  // XXX Consider managing non top level PDocAccessibles with their parent
+  // document accessible.
+  const ManagedContainer<PDocAccessibleParent>& docs =
+      ManagedPDocAccessibleParent();
+  for (auto iter = docs.ConstIter(); !iter.Done(); iter.Next()) {
+    auto doc = static_cast<a11y::DocAccessibleParent*>(iter.Get()->GetKey());
+    if (doc->IsTopLevel()) {
+      return doc;
+    }
+  }
+
+  MOZ_ASSERT(docs.Count() == 0,
+             "If there isn't a top level accessible doc "
+             "there shouldn't be an accessible doc at all!");
+#endif
+  return nullptr;
+}
+
+RenderFrame* BrowserParent::GetRenderFrame() {
+  if (!mRenderFrame.IsInitialized()) {
+    return nullptr;
+  }
+  return &mRenderFrame;
+}
+
+ShowInfo BrowserParent::GetShowInfo() {
+  TryCacheDPIAndScale();
+  if (mFrameElement) {
+    nsAutoString name;
+    mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
+    bool allowFullscreen =
+        mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) ||
+        mFrameElement->HasAttr(kNameSpaceID_None,
+                               nsGkAtoms::mozallowfullscreen);
+    bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None,
+                                            nsGkAtoms::mozprivatebrowsing);
+    bool isTransparent =
+        nsContentUtils::IsChromeDoc(mFrameElement->OwnerDoc()) &&
+        mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::transparent);
+    return ShowInfo(name, allowFullscreen, isPrivate, false, isTransparent,
+                    mDPI, mRounding, mDefaultScale.scale);
+  }
+
+  return ShowInfo(EmptyString(), false, false, false, false, mDPI, mRounding,
+                  mDefaultScale.scale);
+}
+
 void BrowserParent::SetOwnerElement(Element* aElement) {
   // If we held previous content then unregister for its events.
   RemoveWindowListeners();
 
   // If we change top-level documents then we need to change our
   // registration with them.
   RefPtr<nsPIWindowRoot> curTopLevelWin, newTopLevelWin;
   if (mFrameElement) {
@@ -424,16 +550,20 @@ void BrowserParent::SetOwnerElement(Elem
   }
 }
 
 NS_IMETHODIMP BrowserParent::GetOwnerElement(Element** aElement) {
   *aElement = do_AddRef(GetOwnerElement()).take();
   return NS_OK;
 }
 
+void BrowserParent::CacheFrameLoader(nsFrameLoader* aFrameLoader) {
+  mFrameLoader = aFrameLoader;
+}
+
 void BrowserParent::AddWindowListeners() {
   if (mFrameElement) {
     if (nsCOMPtr<nsPIDOMWindowOuter> window =
             mFrameElement->OwnerDoc()->GetWindow()) {
       nsCOMPtr<EventTarget> eventTarget = window->GetTopWindowRoot();
       if (eventTarget) {
         eventTarget->AddEventListener(NS_LITERAL_STRING("MozUpdateWindowPos"),
                                       this, false, false);
@@ -1061,36 +1191,16 @@ mozilla::ipc::IPCResult BrowserParent::R
     doc->MaybeInitWindowEmulation();
     doc->SendParentCOMProxy();
 #  endif
   }
 #endif
   return IPC_OK();
 }
 
-a11y::DocAccessibleParent* BrowserParent::GetTopLevelDocAccessible() const {
-#ifdef ACCESSIBILITY
-  // XXX Consider managing non top level PDocAccessibles with their parent
-  // document accessible.
-  const ManagedContainer<PDocAccessibleParent>& docs =
-      ManagedPDocAccessibleParent();
-  for (auto iter = docs.ConstIter(); !iter.Done(); iter.Next()) {
-    auto doc = static_cast<a11y::DocAccessibleParent*>(iter.Get()->GetKey());
-    if (doc->IsTopLevel()) {
-      return doc;
-    }
-  }
-
-  MOZ_ASSERT(docs.Count() == 0,
-             "If there isn't a top level accessible doc "
-             "there shouldn't be an accessible doc at all!");
-#endif
-  return nullptr;
-}
-
 PFilePickerParent* BrowserParent::AllocPFilePickerParent(const nsString& aTitle,
                                                          const int16_t& aMode) {
   return new FilePickerParent(aTitle, aMode);
 }
 
 bool BrowserParent::DeallocPFilePickerParent(PFilePickerParent* actor) {
   delete actor;
   return true;
@@ -1824,42 +1934,16 @@ mozilla::ipc::IPCResult BrowserParent::R
   mCursor = aCursor;
   mCustomCursor = cursorImage;
   mCustomCursorHotspotX = aHotspotX;
   mCustomCursorHotspotY = aHotspotY;
 
   return IPC_OK();
 }
 
-nsIXULBrowserWindow* BrowserParent::GetXULBrowserWindow() {
-  if (!mFrameElement) {
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIDocShell> docShell = mFrameElement->OwnerDoc()->GetDocShell();
-  if (!docShell) {
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
-  docShell->GetTreeOwner(getter_AddRefs(treeOwner));
-  if (!treeOwner) {
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIXULWindow> window = do_GetInterface(treeOwner);
-  if (!window) {
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow;
-  window->GetXULBrowserWindow(getter_AddRefs(xulBrowserWindow));
-  return xulBrowserWindow;
-}
-
 mozilla::ipc::IPCResult BrowserParent::RecvSetStatus(const uint32_t& aType,
                                                      const nsString& aStatus) {
   nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow = GetXULBrowserWindow();
   if (!xulBrowserWindow) {
     return IPC_OK();
   }
 
   switch (aType) {
@@ -2642,27 +2726,16 @@ void BrowserParent::PopFocus(BrowserPare
   while (pos < sFocusStack->Length()) {
     BrowserParent* popped = sFocusStack->PopLastElement();
     BrowserParent* focused = GetFocused();
     LOGBROWSERFOCUS(("PopFocus changed focus to %p", focused));
     IMEStateManager::OnFocusMovedBetweenBrowsers(popped, focused);
   }
 }
 
-RenderFrame* BrowserParent::GetRenderFrame() {
-  if (!mRenderFrame.IsInitialized()) {
-    return nullptr;
-  }
-  return &mRenderFrame;
-}
-
-BrowserBridgeParent* BrowserParent::GetBrowserBridgeParent() const {
-  return mBrowserBridgeParent;
-}
-
 mozilla::ipc::IPCResult BrowserParent::RecvRequestIMEToCommitComposition(
     const bool& aCancel, bool* aIsCommitted, nsString* aCommittedString) {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     *aIsCommitted = false;
     return IPC_OK();
   }
 
@@ -2739,30 +2812,16 @@ mozilla::ipc::IPCResult BrowserParent::R
 }
 
 mozilla::ipc::IPCResult BrowserParent::RecvSetInputContext(
     const InputContext& aContext, const InputContextAction& aAction) {
   IMEStateManager::SetInputContextForChildProcess(this, aContext, aAction);
   return IPC_OK();
 }
 
-already_AddRefed<nsIWidget> BrowserParent::GetTopLevelWidget() {
-  nsCOMPtr<nsIContent> content = mFrameElement;
-  if (content) {
-    PresShell* presShell = content->OwnerDoc()->GetPresShell();
-    if (presShell) {
-      nsViewManager* vm = presShell->GetViewManager();
-      nsCOMPtr<nsIWidget> widget;
-      vm->GetRootWidget(getter_AddRefs(widget));
-      return widget.forget();
-    }
-  }
-  return nullptr;
-}
-
 mozilla::ipc::IPCResult BrowserParent::RecvSetNativeChildOfShareableWindow(
     const uintptr_t& aChildWindow) {
 #if defined(XP_WIN)
   nsCOMPtr<nsIWidget> widget = GetTopLevelWidget();
   if (widget) {
     // Note that this call will probably cause a sync native message to the
     // process that owns the child window.
     widget->SetNativeData(NS_NATIVE_CHILD_OF_SHAREABLE_WINDOW, aChildWindow);
@@ -2868,35 +2927,16 @@ void BrowserParent::TryCacheDPIAndScale(
 
   if (widget) {
     mDPI = widget->GetDPI();
     mRounding = widget->RoundsWidgetCoordinatesTo();
     mDefaultScale = widget->GetDefaultScale();
   }
 }
 
-already_AddRefed<nsIWidget> BrowserParent::GetWidget() const {
-  if (!mFrameElement) {
-    return nullptr;
-  }
-  nsCOMPtr<nsIWidget> widget = nsContentUtils::WidgetForContent(mFrameElement);
-  if (!widget) {
-    widget = nsContentUtils::WidgetForDocument(mFrameElement->OwnerDoc());
-  }
-  return widget.forget();
-}
-
-already_AddRefed<nsIWidget> BrowserParent::GetDocWidget() const {
-  if (!mFrameElement) {
-    return nullptr;
-  }
-  return do_AddRef(
-      nsContentUtils::WidgetForDocument(mFrameElement->OwnerDoc()));
-}
-
 void BrowserParent::ApzAwareEventRoutingToChild(
     ScrollableLayerGuid* aOutTargetGuid, uint64_t* aOutInputBlockId,
     nsEventStatus* aOutApzResponse) {
   // Let the widget know that the event will be sent to the child process,
   // which will (hopefully) send a confirmation notice back to APZ.
   // Do this even if APZ is off since we need it for swipe gesture support on
   // OS X without APZ.
   InputAPZContext::SetRoutedToChildProcess();
@@ -2965,38 +3005,16 @@ mozilla::ipc::IPCResult BrowserParent::R
 mozilla::ipc::IPCResult BrowserParent::RecvRespondStartSwipeEvent(
     const uint64_t& aInputBlockId, const bool& aStartSwipe) {
   if (nsCOMPtr<nsIWidget> widget = GetWidget()) {
     widget->ReportSwipeStarted(aInputBlockId, aStartSwipe);
   }
   return IPC_OK();
 }
 
-already_AddRefed<nsILoadContext> BrowserParent::GetLoadContext() {
-  nsCOMPtr<nsILoadContext> loadContext;
-  if (mLoadContext) {
-    loadContext = mLoadContext;
-  } else {
-    bool isPrivate = mChromeFlags & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW;
-    SetPrivateBrowsingAttributes(isPrivate);
-    bool useTrackingProtection = false;
-    nsCOMPtr<nsIDocShell> docShell = mFrameElement->OwnerDoc()->GetDocShell();
-    if (docShell) {
-      docShell->GetUseTrackingProtection(&useTrackingProtection);
-    }
-    loadContext = new LoadContext(
-        GetOwnerElement(), true /* aIsContent */, isPrivate,
-        mChromeFlags & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW,
-        mChromeFlags & nsIWebBrowserChrome::CHROME_FISSION_WINDOW,
-        useTrackingProtection, OriginAttributesRef());
-    mLoadContext = loadContext;
-  }
-  return loadContext.forget();
-}
-
 // defined in nsIRemoteTab
 NS_IMETHODIMP
 BrowserParent::SetDocShellIsActive(bool isActive) {
   mDocShellIsActive = isActive;
   SetRenderLayers(isActive);
   Unused << SendSetDocShellIsActive(isActive);
 
   // update active accessible documents on windows
@@ -3711,38 +3729,16 @@ BrowserParent::StopApzAutoscroll(nsViewI
                                gfxUtils::GetContentRenderRoot());
 
       widget->StopAsyncAutoscroll(guid);
     }
   }
   return NS_OK;
 }
 
-ShowInfo BrowserParent::GetShowInfo() {
-  TryCacheDPIAndScale();
-  if (mFrameElement) {
-    nsAutoString name;
-    mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
-    bool allowFullscreen =
-        mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) ||
-        mFrameElement->HasAttr(kNameSpaceID_None,
-                               nsGkAtoms::mozallowfullscreen);
-    bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None,
-                                            nsGkAtoms::mozprivatebrowsing);
-    bool isTransparent =
-        nsContentUtils::IsChromeDoc(mFrameElement->OwnerDoc()) &&
-        mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::transparent);
-    return ShowInfo(name, allowFullscreen, isPrivate, false, isTransparent,
-                    mDPI, mRounding, mDefaultScale.scale);
-  }
-
-  return ShowInfo(EmptyString(), false, false, false, false, mDPI, mRounding,
-                  mDefaultScale.scale);
-}
-
 mozilla::ipc::IPCResult BrowserParent::RecvLookUpDictionary(
     const nsString& aText, nsTArray<FontRange>&& aFontRangeArray,
     const bool& aIsVertical, const LayoutDeviceIntPoint& aPoint) {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     return IPC_OK();
   }
 
--- a/dom/ipc/BrowserParent.h
+++ b/dom/ipc/BrowserParent.h
@@ -137,42 +137,74 @@ class BrowserParent final : public PBrow
       layers::LayersId aLayersId);
 
   static TabId GetTabIdFrom(nsIDocShell* docshell);
 
   static bool AreRecordReplayTabsActive() {
     return gNumActiveRecordReplayTabs != 0;
   }
 
+  const TabId GetTabId() const { return mTabId; }
+
+  ContentParent* Manager() const { return mManager; }
+
+  CanonicalBrowsingContext* GetBrowsingContext() { return mBrowsingContext; }
+
+  already_AddRefed<nsILoadContext> GetLoadContext();
+
   Element* GetOwnerElement() const { return mFrameElement; }
+
+  nsIBrowserDOMWindow* GetBrowserDOMWindow() const { return mBrowserDOMWindow; }
+
+  // Returns the BrowserBridgeParent if this BrowserParent is for an
+  // out-of-process iframe and nullptr otherwise.
+  BrowserBridgeParent* GetBrowserBridgeParent() const {
+    return mBrowserBridgeParent;
+  }
+
   already_AddRefed<nsPIDOMWindowOuter> GetParentWindowOuter();
 
+  already_AddRefed<nsIWidget> GetTopLevelWidget();
+
+  // Returns the closest widget for our frameloader's content.
+  already_AddRefed<nsIWidget> GetWidget() const;
+
+  // Returns the top-level widget for our frameloader's document.
+  already_AddRefed<nsIWidget> GetDocWidget() const;
+
+  nsIXULBrowserWindow* GetXULBrowserWindow();
+
+  /**
+   * Return the top level doc accessible parent for this tab.
+   */
+  a11y::DocAccessibleParent* GetTopLevelDocAccessible() const;
+
+  layout::RenderFrame* GetRenderFrame();
+
+  ShowInfo GetShowInfo();
+
+  /**
+   * Let managees query if Destroy() is already called so they don't send out
+   * messages when the PBrowser actor is being destroyed.
+   */
+  bool IsDestroyed() const { return mIsDestroyed; }
+
   void SetOwnerElement(Element* aElement);
 
-  void CacheFrameLoader(nsFrameLoader* aFrameLoader);
-
-  nsIBrowserDOMWindow* GetBrowserDOMWindow() const { return mBrowserDOMWindow; }
-
   void SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserDOMWindow) {
     mBrowserDOMWindow = aBrowserDOMWindow;
   }
 
   void SetHasContentOpener(bool aHasContentOpener);
 
   void SwapFrameScriptsFrom(nsTArray<FrameScriptInfo>& aFrameScripts) {
     aFrameScripts.SwapElements(mDelayedFrameScripts);
   }
 
-  already_AddRefed<nsILoadContext> GetLoadContext();
-
-  already_AddRefed<nsIWidget> GetTopLevelWidget();
-
-  nsIXULBrowserWindow* GetXULBrowserWindow();
-
-  CanonicalBrowsingContext* GetBrowsingContext() { return mBrowsingContext; }
+  void CacheFrameLoader(nsFrameLoader* aFrameLoader);
 
   void Destroy();
 
   void RemoveWindowListeners();
 
   void AddWindowListeners();
 
   mozilla::ipc::IPCResult RecvMoveFocus(const bool& aForward,
@@ -360,21 +392,16 @@ class BrowserParent final : public PBrow
 
   bool DeallocPDocAccessibleParent(PDocAccessibleParent*);
 
   virtual mozilla::ipc::IPCResult RecvPDocAccessibleConstructor(
       PDocAccessibleParent* aDoc, PDocAccessibleParent* aParentDoc,
       const uint64_t& aParentID, const uint32_t& aMsaaID,
       const IAccessibleHolder& aDocCOMProxy) override;
 
-  /**
-   * Return the top level doc accessible parent for this tab.
-   */
-  a11y::DocAccessibleParent* GetTopLevelDocAccessible() const;
-
   PWindowGlobalParent* AllocPWindowGlobalParent(const WindowGlobalInit& aInit);
 
   bool DeallocPWindowGlobalParent(PWindowGlobalParent* aActor);
 
   virtual mozilla::ipc::IPCResult RecvPWindowGlobalConstructor(
       PWindowGlobalParent* aActor, const WindowGlobalInit& aInit) override;
 
   PBrowserBridgeParent* AllocPBrowserBridgeParent(
@@ -517,32 +544,16 @@ class BrowserParent final : public PBrow
 
   bool HandleQueryContentEvent(mozilla::WidgetQueryContentEvent& aEvent);
 
   bool SendPasteTransferable(const IPCDataTransfer& aDataTransfer,
                              const bool& aIsPrivateData,
                              nsIPrincipal* aRequestingPrincipal,
                              const uint32_t& aContentPolicyType);
 
-  ContentParent* Manager() const { return mManager; }
-
-  /**
-   * Let managees query if Destroy() is already called so they don't send out
-   * messages when the PBrowser actor is being destroyed.
-   */
-  bool IsDestroyed() const { return mIsDestroyed; }
-
-  // Returns the closest widget for our frameloader's content.
-  already_AddRefed<nsIWidget> GetWidget() const;
-
-  // Returns the top-level widget for our frameloader's document.
-  already_AddRefed<nsIWidget> GetDocWidget() const;
-
-  const TabId GetTabId() const { return mTabId; }
-
   // Helper for transforming a point
   LayoutDeviceIntPoint TransformPoint(
       const LayoutDeviceIntPoint& aPoint,
       const LayoutDeviceToLayoutDeviceMatrix4x4& aMatrix);
   LayoutDevicePoint TransformPoint(
       const LayoutDevicePoint& aPoint,
       const LayoutDeviceToLayoutDeviceMatrix4x4& aMatrix);
 
@@ -610,36 +621,28 @@ class BrowserParent final : public PBrow
       nsIPrincipal* aPrincipal);
 
   void AddInitialDnDDataTo(DataTransfer* aDataTransfer,
                            nsIPrincipal** aPrincipal);
 
   bool TakeDragVisualization(RefPtr<mozilla::gfx::SourceSurface>& aSurface,
                              LayoutDeviceIntRect* aDragRect);
 
-  layout::RenderFrame* GetRenderFrame();
-
-  // Returns the BrowserBridgeParent if this BrowserParent is for an
-  // out-of-process iframe and nullptr otherwise.
-  BrowserBridgeParent* GetBrowserBridgeParent() const;
-
   mozilla::ipc::IPCResult RecvEnsureLayersConnected(
       CompositorOptions* aCompositorOptions);
 
   // LiveResizeListener implementation
   void LiveResizeStarted() override;
   void LiveResizeStopped() override;
 
   void SetReadyToHandleInputEvents() { mIsReadyToHandleInputEvents = true; }
   bool IsReadyToHandleInputEvents() { return mIsReadyToHandleInputEvents; }
 
   void NavigateByKey(bool aForward, bool aForDocumentNavigation);
 
-  ShowInfo GetShowInfo();
-
  protected:
   bool ReceiveMessage(
       const nsString& aMessage, bool aSync, ipc::StructuredCloneData* aData,
       mozilla::jsipc::CpowHolder* aCpows, nsIPrincipal* aPrincipal,
       nsTArray<ipc::StructuredCloneData>* aJSONRetVal = nullptr);
 
   mozilla::ipc::IPCResult RecvAsyncAuthPrompt(const nsCString& aUri,
                                               const nsString& aRealm,