Bug 1547812 - Add some documentation to PBrowser and PBrowserBridge. r=nika
authorRyan Hunt <rhunt@eqrion.net>
Mon, 06 May 2019 14:47:56 +0000
changeset 472719 a8d47a634db1d0a64a70c97eab4fc585a70e5d80
parent 472718 53628848cf17ab7bed1ebe2c54def1bf1a4b22c5
child 472720 683736527e1e290a24b843c2915afb5985649d55
push id35976
push useropoprus@mozilla.com
push dateMon, 06 May 2019 21:44:12 +0000
treeherdermozilla-central@e9f5f01d8b8e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1547812
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 1547812 - Add some documentation to PBrowser and PBrowserBridge. r=nika Depends on D29251 Differential Revision: https://phabricator.services.mozilla.com/D29894
dom/ipc/BrowserBridgeChild.h
dom/ipc/BrowserBridgeParent.h
dom/ipc/BrowserChild.h
dom/ipc/BrowserParent.h
dom/ipc/PBrowser.ipdl
dom/ipc/PBrowserBridge.ipdl
--- a/dom/ipc/BrowserBridgeChild.h
+++ b/dom/ipc/BrowserBridgeChild.h
@@ -10,17 +10,18 @@
 #include "mozilla/dom/PBrowserBridgeChild.h"
 #include "mozilla/dom/BrowserChild.h"
 
 namespace mozilla {
 namespace dom {
 class BrowsingContext;
 
 /**
- * Child side for a remote frame.
+ * BrowserBridgeChild implements the child actor part of the PBrowserBridge
+ * protocol. See PBrowserBridge for more information.
  */
 class BrowserBridgeChild : public PBrowserBridgeChild {
  public:
   NS_INLINE_DECL_REFCOUNTING(BrowserBridgeChild);
 
   BrowserChild* Manager() {
     MOZ_ASSERT(mIPCOpen);
     return static_cast<BrowserChild*>(PBrowserBridgeChild::Manager());
--- a/dom/ipc/BrowserBridgeParent.h
+++ b/dom/ipc/BrowserBridgeParent.h
@@ -8,16 +8,20 @@
 #define mozilla_dom_BrowserBridgeParent_h
 
 #include "mozilla/dom/PBrowserBridgeParent.h"
 #include "mozilla/dom/BrowserParent.h"
 
 namespace mozilla {
 namespace dom {
 
+/**
+ * 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);
 
   BrowserBridgeParent();
 
   // Initialize this actor after performing startup.
   nsresult Init(const nsString& aPresentationURL, const nsString& aRemoteType,
--- a/dom/ipc/BrowserChild.h
+++ b/dom/ipc/BrowserChild.h
@@ -191,16 +191,20 @@ class BrowserChildBase : public nsISuppo
 
   bool UpdateFrameHandler(const mozilla::layers::RepaintRequest& aRequest);
 
  protected:
   RefPtr<BrowserChildMessageManager> mBrowserChildMessageManager;
   nsCOMPtr<nsIWebBrowserChrome3> mWebBrowserChrome;
 };
 
+/**
+ * BrowserChild implements the child actor part of the PBrowser protocol. See
+ * PBrowser for more information.
+ */
 class BrowserChild final : public BrowserChildBase,
                            public PBrowserChild,
                            public nsIWebBrowserChrome2,
                            public nsIEmbeddingSiteWindow,
                            public nsIWebBrowserChromeFocus,
                            public nsIInterfaceRequestor,
                            public nsIWindowProvider,
                            public nsSupportsWeakReference,
--- a/dom/ipc/BrowserParent.h
+++ b/dom/ipc/BrowserParent.h
@@ -73,16 +73,20 @@ class ContentParent;
 class Element;
 class DataTransfer;
 class BrowserBridgeParent;
 
 namespace ipc {
 class StructuredCloneData;
 }  // namespace ipc
 
+/**
+ * BrowserParent implements the parent actor part of the PBrowser protocol. See
+ * PBrowser for more information.
+ */
 class BrowserParent final : public PBrowserParent,
                             public nsIDOMEventListener,
                             public nsIRemoteTab,
                             public nsIAuthPromptProvider,
                             public nsIKeyEventInPluginCallback,
                             public nsSupportsWeakReference,
                             public TabContext,
                             public LiveResizeListener {
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -113,16 +113,23 @@ struct WebProgressData
 
 struct RequestData
 {
   nsIURI requestURI;
   nsIURI originalRequestURI;
   nsCString matchedList;
 };
 
+/**
+ * A PBrowser manages a maximal locally connected subtree of BrowsingContexts
+ * in a content process.
+ *
+ * See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
+ * actors.
+ */
 nested(upto inside_cpow) sync protocol PBrowser
 {
     manager PContent;
 
     manages PColorPicker;
     manages PDocAccessible;
     manages PFilePicker;
     manages PPluginWidget;
--- a/dom/ipc/PBrowserBridge.ipdl
+++ b/dom/ipc/PBrowserBridge.ipdl
@@ -13,17 +13,21 @@ using nsSizeMode from "nsIWidgetListener
 using mozilla::layers::LayersObserverEpoch from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
 using mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
 
 namespace mozilla {
 namespace dom {
 
 /**
- * PBrowserBridge corresponds to a remote iframe.
+ * A PBrowserBridge connects an iframe/browser in a content process to the
+ * PBrowser that manages the embedded content.
+ *
+ * See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
+ * actors.
  */
 async protocol PBrowserBridge {
   manager PBrowser;
 
 child:
   async SetLayersId(LayersId layersId);
 
   /**