[email protected] | 5ec3ed8 | 2012-12-27 11:44:00 | [diff] [blame^] | 1 | This directory is for components that have the Content Module as the |
| 2 | uppermost layer they depend on. They may depend only on the Content |
| 3 | API (content/public) and on lower layers (e.g. base/, net/, ipc/ |
| 4 | etc.). |
| 5 | |
| 6 | Components that have bits of code that need to live in different |
| 7 | processes (e.g. some code in the browser process, some in the renderer |
| 8 | process, etc.) should separate the code into different subdirectories. |
| 9 | Hence for a component named 'foo' you might end up with a structure |
| 10 | like the following: |
| 11 | |
| 12 | components/foo - DEPS, OWNERS, foo.gypi |
| 13 | components/foo/browser - code that needs the browser process |
| 14 | components/foo/common - for e.g. IPC constants and such |
| 15 | components/foo/renderer - code that needs renderer process |
| 16 | |
| 17 | These subdirectories should have DEPS files with the relevant |
| 18 | restrictions in place, i.e. only components/*/browser should |
| 19 | be allowed to #include from content/public/browser. |
| 20 | |
| 21 | Note that there may also be an 'android' subdir, with a Java source |
| 22 | code structure underneath it where the package name is |
| 23 | org.chromium.components.foo, and with subdirs after 'foo' |
| 24 | to illustrate process, e.g. 'browser' or 'renderer': |
| 25 | |
| 26 | components/foo/android/OWNERS, DEPS |
| 27 | components/foo/android/java/src/org/chromium/components/foo/browser/ |
| 28 | components/foo/android/javatests/src/org/chromium/components/foo/browser/ |
| 29 | |
| 30 | Code in this directory should be placed in the components:: namespace. |