blob: 6e8c62dfe2a84fe2f82df71709baca281be836cd [file] [log] [blame]
dprankebfefb4a2015-09-25 00:35:361# Do NOT add chrome to the list below. We shouldn't be including files
jam78d1ddc2016-06-29 17:43:002# from src/chrome in src/content.
[email protected]0dd3a0ab2011-02-18 08:17:443include_rules = [
[email protected]da13e892011-03-15 20:27:354 # The subdirectories in content/ will manually allow their own include
5 # directories in content/ so we disallow all of them.
6 "-content",
Dominic Mazzoni67f02ae2019-02-22 04:33:227 "+content/app/strings/grit", # For generated headers
[email protected]da13e892011-03-15 20:27:358 "+content/common",
[email protected]ae8d08982014-08-20 19:42:299 "+content/grit",
[email protected]e091df82011-10-11 18:13:2110 "+content/public/common",
[email protected]a936457902012-06-02 17:19:1811 "+content/public/test",
Russ Hamilton92492382021-04-10 01:04:2712 "+content/services/auction_worklet/public",
[email protected]91c06e5e2011-07-29 16:48:1913 "+content/test",
jam78d1ddc2016-06-29 17:43:0014 "+blink/public/resources/grit",
[email protected]dae054db2013-02-15 18:59:5915 "+cc",
[email protected]054450392013-06-14 15:46:1016
jam78d1ddc2016-06-29 17:43:0017 "-components",
18 # Content can depend on components that are:
Francois Dorayf7d340722019-04-05 20:28:5019 # 1) related to the implementation of the web platform, or,
Blink Reformata30d4232018-04-07 15:31:0620 # 2) shared code between third_party/blink and content
jam78d1ddc2016-06-29 17:43:0021 # It should not depend on chrome features or implementation details, i.e. the
22 # original components/ directories which was code split out from chrome/ to be
23 # shared with iOS. This includes, but isn't limited to, browser features such
24 # as autofill or extensions, and chrome implementation details such as
25 # settings, packaging details, installation or crash reporting.
26
Sean Maher2dcbd7812024-04-23 17:03:5527 "+components/app_launch_prefetch",
Nan Lin153a5452022-12-14 19:07:3128 "+components/attribution_reporting",
Yao Xiao7ed68e02022-02-25 01:08:2029 "+components/browsing_topics/common",
Ryan Tarpine35c4db22024-12-26 21:56:0230 "+components/content_settings/core/common",
Svend Larsene5cae592025-08-13 20:25:0631 "+components/history/core/browser/features.h",
Kartar Singh746606522024-05-29 09:34:3032 "+components/input",
Albert J. Wong23183a12021-08-13 00:23:3533 "+components/memory_pressure",
Steven Holtedefae36d2025-04-21 21:11:4134 "+components/optimization_guide/public/mojom",
Rupert Ben Wisera43f7e472025-06-04 06:22:1735 "+components/origin_matcher",
Joe Mason3771e132024-11-15 23:13:5636 # components/performance_manager sits between chrome/ and content/, except for
37 # the mojo interfaces it exposes to content/ and third_party/blink/.
38 "+components/performance_manager/public/mojom",
Joe Mason5e3b89e2025-02-13 21:49:2139 # components/performance_manager/scenario_api is a subcomponent that can
40 # query performance_manager scenarios from content/ and third_party/blink/.
41 "+components/performance_manager/scenario_api",
Luciano Pacheco99533e82018-03-28 07:49:0742 "+components/services/filesystem",
Ken Rockot7a295c62018-07-10 20:42:4243 "+components/services/font/public",
David Yeungb6d5de52024-06-13 22:56:1244 "+components/services/font_data/public",
Sean Maherf5caf32c2023-09-07 14:41:3045 "+components/startup_metric_utils",
Caitlin Fischer81847d92020-09-21 01:42:5746 "+components/variations",
Raymes Khourye24e0a92021-12-20 01:16:1647 "+components/value_store",
Luciano Pacheco99533e82018-03-28 07:49:0748
[email protected]dae054db2013-02-15 18:59:5949 "+crypto",
[email protected]e5f893b2013-07-30 02:52:2250 "+grit/blink_resources.h",
[email protected]dbd825842011-11-25 20:55:2451
[email protected]341689672011-08-25 21:26:1752 "+dbus",
[email protected]d6d8f712011-03-10 22:54:4353 "+gpu",
markdittmer6e70beb82016-05-02 05:40:4754 "+media",
Ken Rockot8a7f35f2018-07-04 19:40:5655 "+mojo/core/embedder",
rockot85dce0862015-11-13 01:33:5956 "+mojo/public",
[email protected]0dd3a0ab2011-02-18 08:17:4457 "+net",
[email protected]d981b2f2011-02-19 07:39:3358 "+printing",
[email protected]a0421732011-02-23 03:55:4059 "+sandbox",
Ken Rockot26cf4742018-02-11 04:10:4060 "+services/proxy_resolver/public/mojom",
Jay Civelli668c097f2018-05-16 20:44:1361 "+services/service_manager/zygote",
[email protected]d981b2f2011-02-19 07:39:3362 "+skia",
[email protected]0dd3a0ab2011-02-18 08:17:4463
[email protected]a1a705e2012-12-17 21:45:0864 # In general, content/ should not rely on google_apis, since URLs
65 # and access tokens should usually be provided by the
66 # embedder.
67 #
68 # There are a couple of specific parts of content that are excepted
mcasas4e216e72016-07-28 21:28:3869 # from this rule, e.g. content/browser/speech/DEPS. These are cases of
[email protected]a1a705e2012-12-17 21:45:0870 # implementations that are strongly tied to Google servers, i.e. we
71 # don't expect alternate implementations to be provided by the
72 # embedder.
73 "-google_apis",
74
[email protected]0dd3a0ab2011-02-18 08:17:4475 # Don't allow inclusion of these other libs we shouldn't be calling directly.
76 "-v8",
77 "-tools",
78
[email protected]ae3fec82011-09-28 15:11:0579 # Allow inclusion of third-party code:
[email protected]6a502252013-12-13 11:49:0980 "+third_party/angle",
tfarina29a3a1742016-10-28 18:47:3381 "+third_party/boringssl/src/include",
[email protected]f82ef062012-04-27 17:52:5482 "+third_party/flac",
[email protected]ae3fec82011-09-28 15:11:0583 "+third_party/mozilla",
ccameron908e4372015-04-29 23:40:0384 "+third_party/ocmock",
[email protected]1389d852014-02-04 00:48:4685 "+third_party/re2",
[email protected]f82ef062012-04-27 17:52:5486 "+third_party/skia",
[email protected]d981b2f2011-02-19 07:39:3387 "+third_party/sqlite",
[email protected]7102690b2011-11-24 13:29:3788 "+third_party/khronos",
[email protected]f82ef062012-04-27 17:52:5489 "+third_party/webrtc",
kjellanderd117efc2016-06-20 20:04:0590 "+third_party/webrtc_overrides",
[email protected]ab099e222013-05-06 16:26:2591 "+third_party/zlib/google",
Blink Reformata30d4232018-04-07 15:31:0692 "+third_party/blink/public",
[email protected]0dd3a0ab2011-02-18 08:17:4493
tapted736e1442014-12-01 22:25:4694 "+ui/accelerated_widget_mac",
[email protected]5eec2f52014-01-06 22:30:5495 "+ui/accessibility",
[email protected]2d02a2002012-09-18 21:47:5696 "+ui/android",
[email protected]c5fcd392011-10-11 16:31:3897 # Aura is analogous to Win32 or a Gtk, so it is allowed.
98 "+ui/aura",
[email protected]ac55e292011-06-24 05:16:0899 "+ui/base",
tom855c4bf32021-09-30 00:27:26100 "+ui/color",
[email protected]116302fc2012-05-05 21:45:41101 "+ui/compositor",
robliao8d63729c2016-03-29 17:49:47102 "+ui/display",
[email protected]7e9acd082013-09-17 23:31:16103 "+ui/events",
[email protected]ac55e292011-06-24 05:16:08104 "+ui/gfx",
[email protected]c9e2cbbb2012-05-12 21:17:27105 "+ui/gl",
mfomitchev3ba450ad2017-04-03 18:20:40106 "+ui/latency",
[email protected]990e6222012-11-16 13:31:18107 "+ui/native_theme",
[email protected]b47dc492014-08-17 07:05:57108 "+ui/resources/grit/ui_resources.h",
[email protected]4344a3c2013-01-17 23:49:20109 "+ui/shell_dialogs",
[email protected]c9bc8f12012-12-15 22:20:09110 "+ui/snapshot",
tfarina272c8d72014-09-07 05:48:46111 "+ui/strings/grit/ui_strings.h",
mohsenf837da7c2014-12-09 19:01:34112 "+ui/touch_selection",
dpapadaaac8a062024-12-20 19:10:37113 "+ui/webui/resources/grit/webui_resources.h",
114 "+ui/webui/resources/grit/webui_resources_map.h",
[email protected]f3b1efd2014-04-30 04:48:20115 "+ui/wm",
[email protected]ac55e292011-06-24 05:16:08116 # Content knows about grd files, but the specifics of how to get a resource
117 # given its id is left to the embedder.
118 "-ui/base/l10n",
119 "-ui/base/resource",
jddukefb312a12015-01-09 01:40:51120 # These files aren't related to grd, so they're fine.
121 "+ui/base/l10n/l10n_util_android.h",
[email protected]59c9f172011-08-25 17:40:21122 "+ui/base/l10n/l10n_util_win.h",
Henrique Ferreiro655d7682023-06-07 01:42:21123 "+ui/base/resource/resource_scale_factor.h",
[email protected]ac55e292011-06-24 05:16:08124
[email protected]fdb08f52011-08-29 17:37:23125 # Content shouldn't depend on views. While we technically don't need this
126 # line, since the top level DEPS doesn't allow it, we add it to make this
[email protected]116302fc2012-05-05 21:45:41127 # explicit.
[email protected]58aed8b2012-09-30 18:32:06128 "-ui/views",
[email protected]fdb08f52011-08-29 17:37:23129
pilgrime92c5fcd2014-09-10 23:31:23130 "+storage/browser",
pilgrim16330552014-09-10 01:32:22131 "+storage/common",
[email protected]5b6f0692012-06-12 05:00:05132
[email protected]58aed8b2012-09-30 18:32:06133 # For generated JNI includes.
Sam Maierf88b948b2024-06-21 15:29:30134 "+content/public/android/common_jni",
Mohamed Heikalc09e1012019-06-21 14:47:26135 "+content/public/android/content_jni_headers",
Andrew Grieve63cbd8ab2023-06-19 21:16:40136 "+content/public/android/content_main_dex_jni",
Mohamed Heikalc09e1012019-06-21 14:47:26137 "+content/public/android/jar_jni",
[email protected]0dd3a0ab2011-02-18 08:17:44138]
lukasza80f7f602016-03-22 23:13:19139
lukasza80f7f602016-03-22 23:13:19140specific_include_rules = {
Avi Drissmanc32a0a572018-03-17 02:35:02141 ".*_browsertest[a-z_]*\.(cc|h|mm)": [
Lukasz Anforowicz1d46ecd2017-07-14 18:21:08142 # content -> content/shell dependency is disallowed, except browser tests.
lukasza80f7f602016-03-22 23:13:19143 "+content/shell/browser",
144 "+content/shell/common",
Lukasz Anforowicz1d46ecd2017-07-14 18:21:08145 ],
Leszek Swirskic062a07f2024-05-02 10:51:09146 "content_(features|switches).h": [
147 # content -> tools dependency is disallowed, except buildflags for switches.
148 "+tools/v8_context_snapshot/buildflags.h",
149 ],
Paul Semelf0ffa8f2025-03-05 17:50:32150 ".*_unittest\.(cc|h|m)": [
151 # unittests can now embed fuzzing tests, and this dependency is needed to
152 # access FUZZ_TEST macro and various domain generators.
153 "+third_party/fuzztest",
154 ],
lukasza80f7f602016-03-22 23:13:19155}
Dave Tapuska6ea98d02024-10-10 22:30:58156
157new_usages_require_review = True