OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
7 | 7 |
8 # Applied by targets internal to content. | 8 # Applied by targets internal to content. |
9 config("content_implementation") { | 9 config("content_implementation") { |
10 defines = [ "CONTENT_IMPLEMENTATION" ] | 10 defines = [ "CONTENT_IMPLEMENTATION" ] |
(...skipping 19 matching lines...) Expand all Loading... |
30 # //content (shared library) -> | 30 # //content (shared library) -> |
31 # //content/public/browser:browser_sources (source set) -> | 31 # //content/public/browser:browser_sources (source set) -> |
32 # //content/browser (source set; this is the non-public browser target) | 32 # //content/browser (source set; this is the non-public browser target) |
33 # //content/public/common:common_sources (source set) | 33 # //content/public/common:common_sources (source set) |
34 # | 34 # |
35 # That the internal content dependencies must depend on the *_sources targets | 35 # That the internal content dependencies must depend on the *_sources targets |
36 # to avoid dependency cycles, and external dependencies must depend on the | 36 # to avoid dependency cycles, and external dependencies must depend on the |
37 # //content/public/browser and similar targets to avoid double-linking (these | 37 # //content/public/browser and similar targets to avoid double-linking (these |
38 # targets make sure the dependency goes through the content shared library | 38 # targets make sure the dependency goes through the content shared library |
39 # when doing a component build). | 39 # when doing a component build). |
| 40 # |
| 41 # TESTS |
| 42 # ----- |
| 43 # Tests are a challenge. The content tests need to access internals of |
| 44 # content/browser, for example, but the tests themselves are outside of the |
| 45 # content component (which is a shared library in the component build). To |
| 46 # prevent external-to-content targets from depending on private headers, |
| 47 # the non-public content/browser target is not a public dep of the content |
| 48 # component. But this means there is also no public path for the content |
| 49 # tests and no way to restrict that just to //content/test/* if we added one. |
| 50 # |
| 51 # As a result, we check deps for //content/test/* only in non-component builds |
| 52 # (which should verify the dependencies are correct for both component and |
| 53 # non-component cases equally). There are targets like |
| 54 # //content/browser:for_content_tests that allow content/test to depend on the |
| 55 # //content/browser target only in non-component builds (when there are no |
| 56 # linking problems) for when check is enabled. |
40 | 57 |
41 if (!is_nacl_nonsfi) { | 58 if (!is_nacl_nonsfi) { |
42 content_shared_components = [ | 59 content_shared_components = [ |
43 "//content/gpu:gpu_sources", | 60 "//content/gpu:gpu_sources", |
44 "//content/public/browser:browser_sources", | 61 "//content/public/browser:browser_sources", |
45 "//content/public/child:child_sources", | 62 "//content/public/child:child_sources", |
46 "//content/public/gpu:gpu_sources", | 63 "//content/public/gpu:gpu_sources", |
47 "//content/public/common:common_sources", | 64 "//content/public/common:common_sources", |
48 "//content/public/plugin:plugin_sources", | 65 "//content/public/plugin:plugin_sources", |
49 "//content/public/renderer:renderer_sources", | 66 "//content/public/renderer:renderer_sources", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 use_qualified_include = true | 109 use_qualified_include = true |
93 outputs = [ | 110 outputs = [ |
94 "grit/content_resources.h", | 111 "grit/content_resources.h", |
95 "content_resources.pak", | 112 "content_resources.pak", |
96 ] | 113 ] |
97 } | 114 } |
98 | 115 |
99 # This target exists to "hold" the content_export header so we can do proper | 116 # This target exists to "hold" the content_export header so we can do proper |
100 # inclusion testing of it. | 117 # inclusion testing of it. |
101 source_set("export") { | 118 source_set("export") { |
| 119 # Must only be used inside of content. |
102 visibility = [ "//content/*" ] | 120 visibility = [ "//content/*" ] |
103 sources = [ | 121 sources = [ |
104 "common/content_export.h", | 122 "common/content_export.h", |
105 ] | 123 ] |
106 } | 124 } |
107 | 125 |
108 # In the GYP build, this file is listed in several targets. In GN just have | 126 # In the GYP build, this file is listed in several targets. In GN just have |
109 # those targets depend on this one. This can be depended on for any | 127 # those targets depend on this one. This can be depended on for any |
110 # platform for simplicity, and is a no-op on non-Windows. | 128 # platform for simplicity, and is a no-op on non-Windows. |
111 source_set("sandbox_helper_win") { | 129 source_set("sandbox_helper_win") { |
112 if (is_win) { | 130 if (is_win) { |
113 sources = [ | 131 sources = [ |
114 "app/sandbox_helper_win.cc", | 132 "app/sandbox_helper_win.cc", |
115 "public/app/sandbox_helper_win.h", | 133 "public/app/sandbox_helper_win.h", |
116 ] | 134 ] |
117 | 135 |
118 deps = [ | 136 deps = [ |
119 "//sandbox", | 137 "//sandbox", |
120 ] | 138 ] |
121 } | 139 } |
122 } | 140 } |
OLD | NEW |