Browsing Context Embedding¶
Embedder Element to nsDocShell¶
In order to render the contents of a BrowsingContext
, the embedding
element needs to be able to communicate with the nsDocShell
which is
currently being used to host it’s content. This is done in 3 different ways
depending on which combination of processes is in-use.
in-process: The
nsFrameLoader
directly embeds thensDocShell
.remote tab: The parent process is the embedder, and uses a
PBrowser
, via aBrowserHost
. TheBrowserChild
actor holds the actualnsDocShell
alive.remote subframe: A content process is the embedder, and uses a
PBrowserBridge
, via aBrowserBridgeHost
to communicate with the parent process. The parent process then uses aBrowserParent
, as in the remote tab case, to communicate with thensDocShell
.
Diagram¶
nsDocShell to Document¶
Embedding an individual document within a nsDocShell
is done within the
content process, which has that docshell.
Diagram¶
This diagram shows the objects involved in a content process which is being
used to host a given BrowsingContext
, along with rough relationships
between them. Dotted lines represent a “current” relationship, whereas solid
lines are a stronger lifetime relationship.