| dpranke | bfefb4a | 2015-09-25 00:35:36 | [diff] [blame] | 1 | # Do NOT add chrome to the list below. We shouldn't be including files |
| jam | 78d1ddc | 2016-06-29 17:43:00 | [diff] [blame] | 2 | # from src/chrome in src/content. |
| [email protected] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 3 | include_rules = [ |
| [email protected] | da13e89 | 2011-03-15 20:27:35 | [diff] [blame] | 4 | # The subdirectories in content/ will manually allow their own include |
| 5 | # directories in content/ so we disallow all of them. |
| 6 | "-content", |
| Dominic Mazzoni | 67f02ae | 2019-02-22 04:33:22 | [diff] [blame] | 7 | "+content/app/strings/grit", # For generated headers |
| [email protected] | da13e89 | 2011-03-15 20:27:35 | [diff] [blame] | 8 | "+content/common", |
| [email protected] | ae8d0898 | 2014-08-20 19:42:29 | [diff] [blame] | 9 | "+content/grit", |
| [email protected] | e091df8 | 2011-10-11 18:13:21 | [diff] [blame] | 10 | "+content/public/common", |
| [email protected] | a93645790 | 2012-06-02 17:19:18 | [diff] [blame] | 11 | "+content/public/test", |
| Russ Hamilton | 9249238 | 2021-04-10 01:04:27 | [diff] [blame] | 12 | "+content/services/auction_worklet/public", |
| [email protected] | 91c06e5e | 2011-07-29 16:48:19 | [diff] [blame] | 13 | "+content/test", |
| jam | 78d1ddc | 2016-06-29 17:43:00 | [diff] [blame] | 14 | "+blink/public/resources/grit", |
| [email protected] | dae054db | 2013-02-15 18:59:59 | [diff] [blame] | 15 | "+cc", |
| [email protected] | 05445039 | 2013-06-14 15:46:10 | [diff] [blame] | 16 | |
| jam | 78d1ddc | 2016-06-29 17:43:00 | [diff] [blame] | 17 | "-components", |
| 18 | # Content can depend on components that are: |
| Francois Doray | f7d34072 | 2019-04-05 20:28:50 | [diff] [blame] | 19 | # 1) related to the implementation of the web platform, or, |
| Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 20 | # 2) shared code between third_party/blink and content |
| jam | 78d1ddc | 2016-06-29 17:43:00 | [diff] [blame] | 21 | # 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 Maher | 2dcbd781 | 2024-04-23 17:03:55 | [diff] [blame] | 27 | "+components/app_launch_prefetch", |
| Nan Lin | 153a545 | 2022-12-14 19:07:31 | [diff] [blame] | 28 | "+components/attribution_reporting", |
| Yao Xiao | 7ed68e0 | 2022-02-25 01:08:20 | [diff] [blame] | 29 | "+components/browsing_topics/common", |
| Ryan Tarpine | 35c4db2 | 2024-12-26 21:56:02 | [diff] [blame] | 30 | "+components/content_settings/core/common", |
| Svend Larsen | e5cae59 | 2025-08-13 20:25:06 | [diff] [blame] | 31 | "+components/history/core/browser/features.h", |
| Kartar Singh | 74660652 | 2024-05-29 09:34:30 | [diff] [blame] | 32 | "+components/input", |
| Albert J. Wong | 23183a1 | 2021-08-13 00:23:35 | [diff] [blame] | 33 | "+components/memory_pressure", |
| Steven Holte | defae36d | 2025-04-21 21:11:41 | [diff] [blame] | 34 | "+components/optimization_guide/public/mojom", |
| Rupert Ben Wiser | a43f7e47 | 2025-06-04 06:22:17 | [diff] [blame] | 35 | "+components/origin_matcher", |
| Joe Mason | 3771e13 | 2024-11-15 23:13:56 | [diff] [blame] | 36 | # 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 Mason | 5e3b89e | 2025-02-13 21:49:21 | [diff] [blame] | 39 | # 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 Pacheco | 99533e8 | 2018-03-28 07:49:07 | [diff] [blame] | 42 | "+components/services/filesystem", |
| Ken Rockot | 7a295c6 | 2018-07-10 20:42:42 | [diff] [blame] | 43 | "+components/services/font/public", |
| David Yeung | b6d5de5 | 2024-06-13 22:56:12 | [diff] [blame] | 44 | "+components/services/font_data/public", |
| Sean Maher | f5caf32c | 2023-09-07 14:41:30 | [diff] [blame] | 45 | "+components/startup_metric_utils", |
| Caitlin Fischer | 81847d9 | 2020-09-21 01:42:57 | [diff] [blame] | 46 | "+components/variations", |
| Raymes Khoury | e24e0a9 | 2021-12-20 01:16:16 | [diff] [blame] | 47 | "+components/value_store", |
| Luciano Pacheco | 99533e8 | 2018-03-28 07:49:07 | [diff] [blame] | 48 | |
| [email protected] | dae054db | 2013-02-15 18:59:59 | [diff] [blame] | 49 | "+crypto", |
| [email protected] | e5f893b | 2013-07-30 02:52:22 | [diff] [blame] | 50 | "+grit/blink_resources.h", |
| [email protected] | dbd82584 | 2011-11-25 20:55:24 | [diff] [blame] | 51 | |
| [email protected] | 34168967 | 2011-08-25 21:26:17 | [diff] [blame] | 52 | "+dbus", |
| [email protected] | d6d8f71 | 2011-03-10 22:54:43 | [diff] [blame] | 53 | "+gpu", |
| markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 54 | "+media", |
| Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 55 | "+mojo/core/embedder", |
| rockot | 85dce086 | 2015-11-13 01:33:59 | [diff] [blame] | 56 | "+mojo/public", |
| [email protected] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 57 | "+net", |
| [email protected] | d981b2f | 2011-02-19 07:39:33 | [diff] [blame] | 58 | "+printing", |
| [email protected] | a042173 | 2011-02-23 03:55:40 | [diff] [blame] | 59 | "+sandbox", |
| Ken Rockot | 26cf474 | 2018-02-11 04:10:40 | [diff] [blame] | 60 | "+services/proxy_resolver/public/mojom", |
| Jay Civelli | 668c097f | 2018-05-16 20:44:13 | [diff] [blame] | 61 | "+services/service_manager/zygote", |
| [email protected] | d981b2f | 2011-02-19 07:39:33 | [diff] [blame] | 62 | "+skia", |
| [email protected] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 63 | |
| [email protected] | a1a705e | 2012-12-17 21:45:08 | [diff] [blame] | 64 | # 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 |
| mcasas | 4e216e7 | 2016-07-28 21:28:38 | [diff] [blame] | 69 | # from this rule, e.g. content/browser/speech/DEPS. These are cases of |
| [email protected] | a1a705e | 2012-12-17 21:45:08 | [diff] [blame] | 70 | # 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] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 75 | # Don't allow inclusion of these other libs we shouldn't be calling directly. |
| 76 | "-v8", |
| 77 | "-tools", |
| 78 | |
| [email protected] | ae3fec8 | 2011-09-28 15:11:05 | [diff] [blame] | 79 | # Allow inclusion of third-party code: |
| [email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 80 | "+third_party/angle", |
| tfarina | 29a3a174 | 2016-10-28 18:47:33 | [diff] [blame] | 81 | "+third_party/boringssl/src/include", |
| [email protected] | f82ef06 | 2012-04-27 17:52:54 | [diff] [blame] | 82 | "+third_party/flac", |
| [email protected] | ae3fec8 | 2011-09-28 15:11:05 | [diff] [blame] | 83 | "+third_party/mozilla", |
| ccameron | 908e437 | 2015-04-29 23:40:03 | [diff] [blame] | 84 | "+third_party/ocmock", |
| [email protected] | 1389d85 | 2014-02-04 00:48:46 | [diff] [blame] | 85 | "+third_party/re2", |
| [email protected] | f82ef06 | 2012-04-27 17:52:54 | [diff] [blame] | 86 | "+third_party/skia", |
| [email protected] | d981b2f | 2011-02-19 07:39:33 | [diff] [blame] | 87 | "+third_party/sqlite", |
| [email protected] | 7102690b | 2011-11-24 13:29:37 | [diff] [blame] | 88 | "+third_party/khronos", |
| [email protected] | f82ef06 | 2012-04-27 17:52:54 | [diff] [blame] | 89 | "+third_party/webrtc", |
| kjellander | d117efc | 2016-06-20 20:04:05 | [diff] [blame] | 90 | "+third_party/webrtc_overrides", |
| [email protected] | ab099e22 | 2013-05-06 16:26:25 | [diff] [blame] | 91 | "+third_party/zlib/google", |
| Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 92 | "+third_party/blink/public", |
| [email protected] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 93 | |
| tapted | 736e144 | 2014-12-01 22:25:46 | [diff] [blame] | 94 | "+ui/accelerated_widget_mac", |
| [email protected] | 5eec2f5 | 2014-01-06 22:30:54 | [diff] [blame] | 95 | "+ui/accessibility", |
| [email protected] | 2d02a200 | 2012-09-18 21:47:56 | [diff] [blame] | 96 | "+ui/android", |
| [email protected] | c5fcd39 | 2011-10-11 16:31:38 | [diff] [blame] | 97 | # Aura is analogous to Win32 or a Gtk, so it is allowed. |
| 98 | "+ui/aura", |
| [email protected] | ac55e29 | 2011-06-24 05:16:08 | [diff] [blame] | 99 | "+ui/base", |
| tom | 855c4bf3 | 2021-09-30 00:27:26 | [diff] [blame] | 100 | "+ui/color", |
| [email protected] | 116302fc | 2012-05-05 21:45:41 | [diff] [blame] | 101 | "+ui/compositor", |
| robliao | 8d63729c | 2016-03-29 17:49:47 | [diff] [blame] | 102 | "+ui/display", |
| [email protected] | 7e9acd08 | 2013-09-17 23:31:16 | [diff] [blame] | 103 | "+ui/events", |
| [email protected] | ac55e29 | 2011-06-24 05:16:08 | [diff] [blame] | 104 | "+ui/gfx", |
| [email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 105 | "+ui/gl", |
| mfomitchev | 3ba450ad | 2017-04-03 18:20:40 | [diff] [blame] | 106 | "+ui/latency", |
| [email protected] | 990e622 | 2012-11-16 13:31:18 | [diff] [blame] | 107 | "+ui/native_theme", |
| [email protected] | b47dc49 | 2014-08-17 07:05:57 | [diff] [blame] | 108 | "+ui/resources/grit/ui_resources.h", |
| [email protected] | 4344a3c | 2013-01-17 23:49:20 | [diff] [blame] | 109 | "+ui/shell_dialogs", |
| [email protected] | c9bc8f1 | 2012-12-15 22:20:09 | [diff] [blame] | 110 | "+ui/snapshot", |
| tfarina | 272c8d7 | 2014-09-07 05:48:46 | [diff] [blame] | 111 | "+ui/strings/grit/ui_strings.h", |
| mohsen | f837da7c | 2014-12-09 19:01:34 | [diff] [blame] | 112 | "+ui/touch_selection", |
| dpapad | aaac8a06 | 2024-12-20 19:10:37 | [diff] [blame] | 113 | "+ui/webui/resources/grit/webui_resources.h", |
| 114 | "+ui/webui/resources/grit/webui_resources_map.h", |
| [email protected] | f3b1efd | 2014-04-30 04:48:20 | [diff] [blame] | 115 | "+ui/wm", |
| [email protected] | ac55e29 | 2011-06-24 05:16:08 | [diff] [blame] | 116 | # 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", |
| jdduke | fb312a1 | 2015-01-09 01:40:51 | [diff] [blame] | 120 | # These files aren't related to grd, so they're fine. |
| 121 | "+ui/base/l10n/l10n_util_android.h", |
| [email protected] | 59c9f17 | 2011-08-25 17:40:21 | [diff] [blame] | 122 | "+ui/base/l10n/l10n_util_win.h", |
| Henrique Ferreiro | 655d768 | 2023-06-07 01:42:21 | [diff] [blame] | 123 | "+ui/base/resource/resource_scale_factor.h", |
| [email protected] | ac55e29 | 2011-06-24 05:16:08 | [diff] [blame] | 124 | |
| [email protected] | fdb08f5 | 2011-08-29 17:37:23 | [diff] [blame] | 125 | # 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] | 116302fc | 2012-05-05 21:45:41 | [diff] [blame] | 127 | # explicit. |
| [email protected] | 58aed8b | 2012-09-30 18:32:06 | [diff] [blame] | 128 | "-ui/views", |
| [email protected] | fdb08f5 | 2011-08-29 17:37:23 | [diff] [blame] | 129 | |
| pilgrim | e92c5fcd | 2014-09-10 23:31:23 | [diff] [blame] | 130 | "+storage/browser", |
| pilgrim | 1633055 | 2014-09-10 01:32:22 | [diff] [blame] | 131 | "+storage/common", |
| [email protected] | 5b6f069 | 2012-06-12 05:00:05 | [diff] [blame] | 132 | |
| [email protected] | 58aed8b | 2012-09-30 18:32:06 | [diff] [blame] | 133 | # For generated JNI includes. |
| Sam Maier | f88b948b | 2024-06-21 15:29:30 | [diff] [blame] | 134 | "+content/public/android/common_jni", |
| Mohamed Heikal | c09e101 | 2019-06-21 14:47:26 | [diff] [blame] | 135 | "+content/public/android/content_jni_headers", |
| Andrew Grieve | 63cbd8ab | 2023-06-19 21:16:40 | [diff] [blame] | 136 | "+content/public/android/content_main_dex_jni", |
| Mohamed Heikal | c09e101 | 2019-06-21 14:47:26 | [diff] [blame] | 137 | "+content/public/android/jar_jni", |
| [email protected] | 0dd3a0ab | 2011-02-18 08:17:44 | [diff] [blame] | 138 | ] |
| lukasza | 80f7f60 | 2016-03-22 23:13:19 | [diff] [blame] | 139 | |
| lukasza | 80f7f60 | 2016-03-22 23:13:19 | [diff] [blame] | 140 | specific_include_rules = { |
| Avi Drissman | c32a0a57 | 2018-03-17 02:35:02 | [diff] [blame] | 141 | ".*_browsertest[a-z_]*\.(cc|h|mm)": [ |
| Lukasz Anforowicz | 1d46ecd | 2017-07-14 18:21:08 | [diff] [blame] | 142 | # content -> content/shell dependency is disallowed, except browser tests. |
| lukasza | 80f7f60 | 2016-03-22 23:13:19 | [diff] [blame] | 143 | "+content/shell/browser", |
| 144 | "+content/shell/common", |
| Lukasz Anforowicz | 1d46ecd | 2017-07-14 18:21:08 | [diff] [blame] | 145 | ], |
| Leszek Swirski | c062a07f | 2024-05-02 10:51:09 | [diff] [blame] | 146 | "content_(features|switches).h": [ |
| 147 | # content -> tools dependency is disallowed, except buildflags for switches. |
| 148 | "+tools/v8_context_snapshot/buildflags.h", |
| 149 | ], |
| Paul Semel | f0ffa8f | 2025-03-05 17:50:32 | [diff] [blame] | 150 | ".*_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 | ], |
| lukasza | 80f7f60 | 2016-03-22 23:13:19 | [diff] [blame] | 155 | } |
| Dave Tapuska | 6ea98d0 | 2024-10-10 22:30:58 | [diff] [blame] | 156 | |
| 157 | new_usages_require_review = True |