# 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 the `nsDocShell`. - *remote tab*: The parent process is the embedder, and uses a `PBrowser`, via a `BrowserHost`. The `BrowserChild` actor holds the actual `nsDocShell` alive. - *remote subframe*: A content process is the embedder, and uses a `PBrowserBridge`, via a `BrowserBridgeHost` to communicate with the parent process. The parent process then uses a `BrowserParent`, as in the *remote tab* case, to communicate with the `nsDocShell`. ### Diagram ```{eval-rst} .. digraph:: embedding node [shape=rectangle] subgraph cluster_choice { color=transparent; node [shape=none]; "In-Process"; "Remote Tab"; "Remote Subframe"; } "nsFrameLoaderOwner" [label="nsFrameLoaderOwner\ne.g.