chromium/content/browser/DEPS

include_rules = [
  # Allow inclusion of specific components that we depend on.
  # See comment in content/DEPS for which components are allowed.
  # *********************************** NOTE ***********************************
  # If adding a new component dependency, email
  # content-owners@chromium.org first.
  # ****************************************************************************
  "+components/discardable_memory/common",
  "+components/discardable_memory/public",
  "+components/discardable_memory/service",
  "+components/download/database",
  "+components/download/public/common",
  "+components/file_access",
  "+components/filename_generation",
  "+components/grit",
  "+components/power_monitor",
  "+components/services/font",
  "+components/services/font_data",
  "+components/services/filesystem",
  "+components/services/quarantine/test_support.h",
  "+components/services/quarantine/quarantine.h",
  "+components/services/storage",
  "+components/services/storage/public",
  "+components/session_manager/core",
  "+components/leveldb_proto/public",
  "+components/link_header_util",
  "+components/metrics",
  "+components/metrics:single_sample_metrics",
  "+components/miracle_parameter",
  "+components/network_session_configurator/common",
  "+components/offline_pages/buildflags/buildflags.h",
  "+components/offline_pages/core/request_header",
  "+components/payments/content/icon",
  "+components/payments/mojom",
  "+components/services/heap_profiling/public",
  "+components/services/quarantine/public/mojom/quarantine.mojom.h",
  "+components/system_media_controls",
  "+components/tracing",
  "+components/ukm",
  "+components/url_formatter",
  "+components/viz",
  "+components/web_package",
  "+components/webauthn/json",
  "+components/cbor",
  "+components/os_crypt/sync/os_crypt_switches.h",
  # *********************************** NOTE ***********************************
  # If adding a new component dependency, email
  # content-owners@chromium.org first.
  # ****************************************************************************

  "+content/public/app",
  "+content/public/browser",
  "+device/base/synchronization",
  "+device/bluetooth",
  "+device/gamepad", # For gamepad API
  "+device/nfc",
  "+device/vr/public", # For WebXR API
  "+device/vr/buildflags/buildflags.h",  # For WebXR API
  # This can only be used on POSIX, in particular it mustn't be used on Windows
  # in the browser DLL.
  "+gin/v8_initializer.h",
  "+mojo",
  "+sql",
  "+ui/aura_extra",
  "+components/vector_icons",
  "+ui/linux",
  "+ui/strings/grit/ax_strings.h",
  "+ui/strings/grit/auto_image_annotation_strings.h",
  "+ui/webui",

  # TODO(crbug.com/40129825): Consider removing "+services". Each service should
  # have explicit rules to allow services/*/public rather than adding a blanket
  # dependency.
  "+services",
  "-services/content",
  "+services/content/service.h",
  "+services/content/service_delegate.h",
  "+services/device/public/cpp/compute_pressure",
  "-services/network",
  "+services/network/public/cpp",
  "+services/network/public/mojom",
  "-services/cert_verifier",
  "+services/cert_verifier/public/cpp",
  "+services/cert_verifier/public/mojom",
  "+services/screen_ai/buildflags",
  "+services/screen_ai/public/cpp",

  # In general, //content shouldn't depend on //device.
  # This is the an exception.
  "+device/udev_linux",  # For udev utility and wrapper library.

  # Explicitly disallow using SyncMessageFilter to prevent browser from
  # sending synchronous IPC messages on non-UI threads.
  "-ipc/ipc_sync_message_filter.h",

  # Other libraries.
  "+third_party/iaccessible2",
  "+third_party/isimpledom",
  "+third_party/khronos",   # For enum definitions only
  "+third_party/libaom/av1_buildflags.h",
  "+third_party/re2",
  "+third_party/rust/cxx",
  "+third_party/zlib",

  # Allow non-browser Chrome OS code to be used.
  "+chromeos",
  "+third_party/cros_system_api",

  # No inclusion of WebKit from the browser, other than the ones in
  # WebKit/public/{mojom,common}, or the ones that are strictly enum/POD,
  # header-only types, and some selected common code.
  "-third_party/blink",
  "+third_party/blink/public/common",
  "+third_party/blink/public/mojom",
  "+third_party/blink/public/platform/resource_request_blocked_reason.h",
  "+third_party/blink/public/platform/web_content_security_policy.h",
  "+third_party/blink/public/platform/web_fullscreen_video_status.h",
  "+third_party/blink/public/platform/web_text_input_type.h",
  "+third_party/blink/public/platform/mac/web_scrollbar_theme.h",
  "+third_party/blink/public/platform/modules/service_worker/web_service_worker_error.h",
  "+third_party/blink/public/platform/modules/sms/webotp_service.mojom.h",
  "+third_party/blink/public/public_buildflags.h",
  "+third_party/blink/public/strings/grit/blink_strings.h",
  "+third_party/blink/public/web/web_ax_enums.h",
  "+third_party/blink/public/web/web_console_message.h",
  "+third_party/blink/public/web/web_drag_status.h",
  "+third_party/blink/public/web/web_serialized_script_value_version.h",
  "+third_party/blink/public/mojom/frame/tree_scope_type.mojom.h",

  "+tools/v8_context_snapshot/buildflags.h",

  # DO NOT ADD ANY CHROME OR COMPONENTS INCLUDES HERE!!!
  # See https://sites.google.com/a/chromium.org/dev/developers/content-module
  # for more information.
]

specific_include_rules = {
  ".*test\.cc": [
    "+components/os_crypt/async",
    "+services/network/test",
  ],
  ".*test_utils?(_.+)?\.(h|cc)": [
    "+services/network/test",
  ],
  "browser_interface_binders\.cc": [
    "+services/webnn/public/mojom/features.mojom-features.h",
  ],
  "browser_main_loop\.cc": [
    # TODO(crbug.com/40672800): Remove.
    "+services/network/transitional_url_loader_factory_owner.h",
    "+device/fido/hid/fido_hid_discovery.h",
  ],
  "browsing_data_(filter_builder|remover)_impl_unittest\.cc": [
    "+services/network/cookie_manager.h",
  ],
  "gpu_data_manager_visual_proxy_ozone_linux\.(cc|h)": [
    "+ui/ozone/public/ozone_platform.h",
    "+ui/ozone/public/platform_gl_egl_utility.h",
  ],
  "navigation_url_loader_impl_unittest\.cc": [
    "+services/network/resource_scheduler/resource_scheduler_client.h",
    "+services/network/url_loader.h",
    "+services/network/url_request_context_owner.h",
  ],
  "network_service_instance_impl\.cc": [
    # Used to instantiate a CertVerifierServiceFactory in the browser process.
    "+services/cert_verifier/cert_verifier_service_factory.h",
    # TODO(crbug.com/40672800): Remove.
    "+services/network/network_service.h",
  ],
  "signed_exchange_handler_unittest\.cc": [
    "+services/network/network_context.h",
  ],
  # SiteInstance and BrowsingInstance should not depend on the types of things
  # that rely on them, like RenderFrameHostImpl or WebContentsImpl.
  "(site_instance_impl|browsing_instance)\.(cc|h)": [
    "-content/browser/renderer_host",
    "-content/browser/web_contents",
    # These files do not cycle back to SiteInstance or BrowsingInstance.
    "+content/browser/renderer_host/render_process_host_impl.h",
    "+content/browser/renderer_host/agent_scheduling_group_host.h",
  ],
  "stable_video_decoder_factory\.cc" : [
    "+ui/ozone/public/ozone_switches.h",
  ],
  "storage_partition_impl_unittest\.cc": [
    "+services/network/cookie_manager.h",
    "+third_party/leveldatabase",
  ],
  "launch_as_mojo_client_browsertest.cc": [
    "+ui/ozone/public/ozone_switches.h",
  ],
  "site_per_process_mac_browsertest\.mm": [
    "+content/app_shim_remote_cocoa",
  ],
  "utility_sandbox_delegate_win\.cc": [
    "+content/utility/sandbox_delegate_data.mojom.h"
  ],
  "web_app_system_media_controls_manager.cc": [
    "+components/remote_cocoa/browser"
  ]

}