Make it legal for everything in blink/modules to use modules:modules

Code in blink/modules/foo/*.cc often use code in modules:modules
which in the build system is not an allowed include. This makes
it legal.

This has no visible impact since the build order is already ok
and gn check errors are disabled for blink, but long term we'd
like to enable gn check and this is a small step on that route.

Bug: 800764

Change-Id: I083ec02f5190b5ee17e0394e1f5add940d1f4172
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1552808
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647778}
diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn
index 24999f7..4def79b 100644
--- a/third_party/blink/renderer/modules/BUILD.gn
+++ b/third_party/blink/renderer/modules/BUILD.gn
@@ -81,14 +81,7 @@
     "//tools/v8_context_snapshot:use_v8_context_snapshot",
   ]
 
-  deps = [
-    ":make_modules_generated",
-    ":module_names",
-    "//net:net",
-    "//third_party/blink/renderer/bindings/modules:generated",
-    "//third_party/blink/renderer/bindings/modules/v8:bindings_modules_impl",
-    "//third_party/blink/renderer/bindings/modules/v8:bindings_modules_origin_trial_features",
-    "//third_party/blink/renderer/core",
+  sub_modules = [
     "//third_party/blink/renderer/modules/accessibility",
     "//third_party/blink/renderer/modules/animationworklet",
     "//third_party/blink/renderer/modules/app_banner",
@@ -168,6 +161,16 @@
     "//third_party/blink/renderer/modules/webusb",
     "//third_party/blink/renderer/modules/worklet",
     "//third_party/blink/renderer/modules/xr",
+  ]
+
+  deps = [
+    ":make_modules_generated",
+    ":module_names",
+    "//net:net",
+    "//third_party/blink/renderer/bindings/modules:generated",
+    "//third_party/blink/renderer/bindings/modules/v8:bindings_modules_impl",
+    "//third_party/blink/renderer/bindings/modules/v8:bindings_modules_origin_trial_features",
+    "//third_party/blink/renderer/core",
     "//third_party/icu",
     "//third_party/webrtc/pc:libjingle_peerconnection",
     "//third_party/webrtc/rtc_base:rtc_base",
@@ -175,6 +178,9 @@
     "//third_party/zlib",
   ]
 
+  public_deps = sub_modules
+  allow_circular_includes_from = sub_modules
+
   if (!is_android) {
     deps += [ "//third_party/blink/renderer/modules/serial" ]
   }