chromium/components/services/storage/privileged/mojom/BUILD.gn

# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")

# Privileged interfaces that are exposed to WebUI renderers.
mojom("mojom_webui") {
  sources = [
    "bucket_client_info.mojom",
    "indexed_db_internals_types.mojom",
  ]
  public_deps = [
    "//components/services/storage/public/mojom/buckets",
    "//mojo/public/mojom/base",
    "//third_party/blink/public/mojom/tokens",
    "//url/mojom:url_mojom_gurl",
    "//url/mojom:url_mojom_origin",
  ]
  cpp_typemaps = [
    {
      types = [
        {
          mojom = "storage.mojom.BucketClientInfo"
          cpp = "::storage::BucketClientInfo"
        },
      ]
      traits_headers = [ "bucket_client_info_mojom_traits.h" ]
      traits_sources = [ "bucket_client_info_mojom_traits.cc" ]
      traits_public_deps = [
        "//components/services/storage/privileged/cpp",
        "//third_party/blink/public/mojom/tokens",
      ]
    },
  ]

  webui_module_path = "/"
}

# Privileged interfaces that are not exposed to renderers.
mojom("mojom") {
  sources = [
    "indexed_db_client_state_checker.mojom",
    "indexed_db_control.mojom",
    "indexed_db_control_test.mojom",
  ]

  cpp_only = true

  # The interfaces defined here are privileged, and not vended to a renderer, so
  # they are not fuzzable by javascript-based fuzzers.
  enable_js_fuzzing = false

  public_deps = [
    ":mojom_webui",
    "//components/services/storage/public/mojom",
    "//third_party/blink/public/mojom:mojom_core",
  ]

  overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ]

  component_deps = [ "//third_party/blink/public/common" ]
}