consumer/: the API via which downstream iOS code will call Chromium code [On hold: Due to the significant flux with componentization and upstreaming, it's not yet clear which code will actually need consumer APIs, so for now this is not enforced and does not need to be built out further.]

Each layered component will be divided as follows:

core/: shared code that is src/content/- and src/ios/-free.

content/: Content-based driver for the component.

ios/: Driver for the component based on src/ios/web/ and src/ios/embed/web/.

For components that are multi-process (i.e., currently have browser/, renderer/, etc. subdirectories), the process division will move to be under the content/ driver (since Chrome for iOS is single-process and almost never uses Chromium code that is not browser-process code).

Detailed Example/Discussion of DEPS Rules

Autofill-Focused Example

The below example indicates a structure for form autofill wherein:

content- or ios-specific code detects that a form is being rendered

core code determines whether there is data with which to fill the form

content- or ios-specific code renders the data

Additionally, we assume that key components of the iOS flow (its WebContents-like object and the object that renders autofill data) are implemented downstream and exposed to upstream code via the embed layer, which will indeed be the case for some amount of time.

Structure under components/autofill/:

core/

AutofillManager interface/impl

AutofillDriver interface

content/

browser/

AutofillDriverImpl

Listens for IPC from the renderer to know when a form is rendered and call into AutofillManager

Receives OnFormDataFilled calls from AutofillManager and sends IPC, which is caught by the renderer

renderer/

ios/

AutofillDriverIOS

Observes WebState to know when a form is rendered and call into AutofillManager

Receives OnFormDataFilled calls from AutofillManager and asks AutofillDriverBridge to render the data