Bug 1549753 - Don't include BrowserParent.h from BrowserBridgeParent.h. r=afarre
authorRyan Hunt <rhunt@eqrion.net>
Tue, 07 May 2019 11:07:47 -0500
changeset 535113 53e37cfca31e24fd6d35d65b33018336126eacc2
parent 535112 1cff97132fe54b935825a17f98056f8f8e5752a5
child 535114 935abf72cddc101831a8f4dc314d1ad94a68c3c9
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersafarre
bugs1549753
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 1549753 - Don't include BrowserParent.h from BrowserBridgeParent.h. r=afarre Differential Revision: https://phabricator.services.mozilla.com/D30214
dom/ipc/BrowserBridgeParent.cpp
dom/ipc/BrowserBridgeParent.h
--- a/dom/ipc/BrowserBridgeParent.cpp
+++ b/dom/ipc/BrowserBridgeParent.cpp
@@ -1,15 +1,16 @@
 /* -*- 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/BrowserBridgeParent.h"
+#include "mozilla/dom/BrowserParent.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ContentProcessManager.h"
 #include "mozilla/dom/CanonicalBrowsingContext.h"
 #include "mozilla/dom/BrowsingContextGroup.h"
 #include "mozilla/layers/InputAPZContext.h"
 
 using namespace mozilla::ipc;
 using namespace mozilla::layout;
@@ -94,16 +95,25 @@ nsresult BrowserBridgeParent::Init(const
     return NS_ERROR_FAILURE;
   }
 
   // Send the newly created layers ID back into content.
   Unused << SendSetLayersId(rf->GetLayersId());
   return NS_OK;
 }
 
+CanonicalBrowsingContext* BrowserBridgeParent::GetBrowsingContext() {
+  return mBrowserParent->GetBrowsingContext();
+}
+
+BrowserParent* BrowserBridgeParent::Manager() {
+  MOZ_ASSERT(mIPCOpen);
+  return static_cast<BrowserParent*>(PBrowserBridgeParent::Manager());
+}
+
 void BrowserBridgeParent::Destroy() {
   if (mBrowserParent) {
     mBrowserParent->Destroy();
     mBrowserParent = nullptr;
   }
 }
 
 IPCResult BrowserBridgeParent::RecvShow(const ScreenIntSize& aSize,
--- a/dom/ipc/BrowserBridgeParent.h
+++ b/dom/ipc/BrowserBridgeParent.h
@@ -3,21 +3,22 @@
 /* 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_BrowserBridgeParent_h
 #define mozilla_dom_BrowserBridgeParent_h
 
 #include "mozilla/dom/PBrowserBridgeParent.h"
-#include "mozilla/dom/BrowserParent.h"
 
 namespace mozilla {
 namespace dom {
 
+class BrowserParent;
+
 /**
  * BrowserBridgeParent implements the parent actor part of the PBrowserBridge
  * protocol. See PBrowserBridge for more information.
  */
 class BrowserBridgeParent : public PBrowserBridgeParent {
  public:
   NS_INLINE_DECL_REFCOUNTING(BrowserBridgeParent);
 
@@ -25,25 +26,20 @@ class BrowserBridgeParent : public PBrow
 
   // Initialize this actor after performing startup.
   nsresult Init(const nsString& aPresentationURL, const nsString& aRemoteType,
                 CanonicalBrowsingContext* aBrowsingContext,
                 const uint32_t& aChromeFlags);
 
   BrowserParent* GetBrowserParent() { return mBrowserParent; }
 
-  CanonicalBrowsingContext* GetBrowsingContext() {
-    return mBrowserParent->GetBrowsingContext();
-  }
+  CanonicalBrowsingContext* GetBrowsingContext();
 
   // Get our manager actor.
-  BrowserParent* Manager() {
-    MOZ_ASSERT(mIPCOpen);
-    return static_cast<BrowserParent*>(PBrowserBridgeParent::Manager());
-  }
+  BrowserParent* Manager();
 
   // Tear down this BrowserBridgeParent.
   void Destroy();
 
  protected:
   friend class PBrowserBridgeParent;
 
   mozilla::ipc::IPCResult RecvShow(const ScreenIntSize& aSize,