In 2015 Sep, we merged the Blink repository into the Chromium repository. The repository merge enabled us to add dependencies from Blink to Chromium and opened a door for significantly simplifying abstraction layers that had been needed to connect Blink with Chromium. However, adding random dependencies from Blink to Chromium will break layering and just mess up the code base. We need a guideline about it.
Before the repository merge, Blink had the following dependency. Public APIs were the only way to connect Blink with Chromium's content layer.
After the repository merge, we're planning to introduce direct dependencies from Blink to Chromium (e.g., wtf/ => base/) to simplify the interactions. To introduce a new dependency, you need to follow the following guideline.
We do want to avoid introducing random dependencies and breaking layering. Unless introducing the dependency is going to have a large benefit (e.g., remove a lot of abstraction classes, remove a lot of code duplication etc), you should instead consider just using public APIs. After the repository merge, it is pretty easy to add/remove/modify public APIs because you no longer need three-sided patches. In particular, remember that:
(Once the intent-to-implement is approved, please add the dependency to the following list. You can also add a link to a discussion log in blink-dev@, design documents etc.)
If you want to know more background about the dependency design, see the following discussions.