See an older diagram at: https://www.chromium.org/developers/content-module.
The diagram illustrates the layering of the different modules. A module can include code directly from lower modules. However, a module can not include code from a module that is higher than it. This is enforced through DEPS rules. Modules can implement embedder APIs so that modules lower than them can call them. Examples of these APIs are the WebKit API and the Content API.
The Content API is how code in content can indirectly call Chrome. Where possible, Chrome features try to hook in by filtering IPCs and listening to events per How to Add New Features (without bloating RenderView/RenderViewHost/WebContents). When there isn't enough context (i.e. callback from WebKit) or when the callback is a one-off, we have a ContentClient
interface that the embedder (Chrome) implements. ContentClient
is available in all processes. Some processes also have their own callback API as well, i.e. ContentBrowserClient/ContentRendererClient/ContentPluginClient
.
The current status is content
doesn't depend on chrome at all (see the meta bug and all bugs it depends on). We now have a basic browser built on top of content
(“content_shell
”) that renders pages using content
on all platforms. This allow developers working on the web platform and core code to only have to build/test content, instead of all of chrome.
We have a separate target for content
's unit tests in content_unittests
, and integration tests in content_browsertests
.
content
is built as a separate dll to speed up the build.
We‘ve created an API around content
, similar to our Blink API. This isolates embedders from content’s inner workings, and makes it clear to people working on content which methods are used by embedders.
Top-level content
OWNERS are reviewers who are qualified to review changes across all of content
and are responsible for its architecture. In general, content
subdirectories will have specific owners who are the experts in reviewing that code, and top-level owners will defer to subdirectory owners as needed. For large architectural changes to content
, all owners should loop in content-owners@chromium.org to give others a chance to post suggestions. This applies to changes large enough to warrant a design doc.
To become a content/OWNER, candidates are expected to show substantial contributions to content
in recent past that demonstrate knowledge of the core architecture and design principles, including both the browser process side and the renderer side. To become a top-level owner, please follow the following process:
Become an owner in a few content
subdirectories and establish yourself as an expert reviewer in those areas.
Find 1-2 current top-level owners who can become your “sponsors” for an owner nomination. Work with them to (1) review your technical changes in content
to gain trust in your technical work and (2) shadow-review content
changes that you also review to gain trust in you as a reviewer. Once ready, your sponsors will nominate you for ownership by sending an email to the current top-level owners.
A typical nomination includes:
content
, and which concepts they covered.git shortlog -s --author=<username> content/browser
.For reference, a top-level content
OWNER is expected to be familiar with most (but not necessarily all) of the following core parts of content
:
content
interacts with compositing and input handling.content/browser
and content/renderer
and/or blink/renderer
.ChildProcessSecurityPolicy
).WebContentsObserver
, ContentBrowserClient
, and NavigationThrottle
.content
embedders beyond //chrome (e.g., Android Webview).Correspondingly, a top-level content
OWNER is typically familiar with most of the following core content
classes:
Render(Frame|FrameProxy|Process|Widget|View)Host
Render(Frame|Widget|Thread)
WebContents
and WebContentsObserver
FrameTree
and FrameTreeNode
RenderFrameHostManager
NavigationHandle
and NavigationRequest
, their ownership and lifetimePage
vs RenderFrameHost
vs blink's Document
, RenderDocumentHostUserData
/NavigationHandleUserData
, and associated lifetime issues.SiteInstance
and BrowsingInstance
, SiteInfo
NavigationController
, NavigationEntry
vs FrameNavigationEntry
ChildProcessSecurityPolicy
BrowserContext
, StoragePartition
ContentBrowserClient