OLD | NEW |
---|---|
1 This directory is for features that are intended for reuse across multiple | 1 This directory is for features that are intended for reuse. Example use cases: |
2 embedders (e.g., Android WebView and Chrome). | 2 -code that is shared by Chrome on iOS and other Chrome platforms (since the iOS |
3 port doesn't use src/chrome) | |
4 -code that is shared between multiple embedders of content (e.g., Android | |
5 WebView and Chrome) | |
6 -code that is shared between Blink and the browser process (since code in the | |
blundell
2016/07/21 08:46:56
It looks like //content/browser includes lots of s
jam
2016/07/21 15:19:59
Those are fine. We can include POD structs that ar
| |
7 browser doesn't use Blink, while Blink doesn't include content or chrome to | |
8 avoid circular dependencies) | |
9 | |
10 In general, if some code is used by component "foo" and things above "foo" in | |
blundell
2016/07/21 08:46:56
I find this comment ambiguous: when you say 'compo
jam
2016/07/21 15:19:59
I meant in a general sense.
jam
2016/07/21 15:23:09
I renamed this from "component" to directory, to m
| |
11 the dependency tree, the code should probably live in "foo". | |
3 | 12 |
4 By default, components can depend only on the lower layers of the Chromium | 13 By default, components can depend only on the lower layers of the Chromium |
5 codebase(e.g. base/, net/, etc.). Individual components may additionally allow | 14 codebase (e.g. base/, net/, etc.). Individual components may additionally allow |
6 dependencies on the content API and IPC; however, if such a component is used | 15 dependencies on the content API and IPC; however, if such a component is used |
7 by Chrome for iOS (which does not use the content API or IPC), the component | 16 by Chrome for iOS (which does not use the content API or IPC), the component |
8 will have to be in the form of a layered component | 17 will have to be in the form of a layered component |
9 (http://www.chromium.org/developers/design-documents/layered-components-design). | 18 (http://www.chromium.org/developers/design-documents/layered-components-design). |
10 | 19 |
11 Components that have bits of code that need to live in different | 20 Components that have bits of code that need to live in different |
12 processes (e.g. some code in the browser process, some in the renderer | 21 processes (e.g. some code in the browser process, some in the renderer |
13 process, etc.) should separate the code into different subdirectories. | 22 process, etc.) should separate the code into different subdirectories. |
14 Hence for a component named 'foo' you might end up with a structure | 23 Hence for a component named 'foo' you might end up with a structure |
15 like the following (assuming that foo is not used by iOS and thus does not | 24 like the following (assuming that foo is not used by iOS and thus does not |
(...skipping 14 matching lines...) Expand all Loading... | |
30 to illustrate process, e.g. 'browser' or 'renderer': | 39 to illustrate process, e.g. 'browser' or 'renderer': |
31 | 40 |
32 components/foo/android/OWNERS, DEPS | 41 components/foo/android/OWNERS, DEPS |
33 components/foo/android/java/src/org/chromium/components/foo/browser/ | 42 components/foo/android/java/src/org/chromium/components/foo/browser/ |
34 components/foo/android/javatests/src/org/chromium/components/foo/browser/ | 43 components/foo/android/javatests/src/org/chromium/components/foo/browser/ |
35 | 44 |
36 Code in a component should be placed in a namespace corresponding to | 45 Code in a component should be placed in a namespace corresponding to |
37 the name of the component; e.g. for a component living in | 46 the name of the component; e.g. for a component living in |
38 //components/foo, code in that component should be in the foo:: | 47 //components/foo, code in that component should be in the foo:: |
39 namespace. | 48 namespace. |
OLD | NEW |