# Copyright 2025 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")

mojom("fingerprinting_protection") {
  sources = [ "noise_token.mojom" ]

  public_deps = [ "//mojo/public/mojom/base" ]

  shared_cpp_typemaps = [
    {
      types = [
        {
          mojom = "blink.mojom.NoiseToken"
          cpp = "::blink::NoiseToken"
          default_constructible = false
          copyable_pass_by_value = true
        },
      ]
      traits_headers = [ "//third_party/blink/public/common/fingerprinting_protection/noise_token_mojom_traits.h" ]
      traits_public_deps = [ "//third_party/blink/public/common:headers" ]
    },
  ]
  cpp_typemaps = shared_cpp_typemaps
  blink_cpp_typemaps = shared_cpp_typemaps

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/platform/platform_export.h"

  generate_java = true

  webui_module_path = "/"

  # Used from locations that rely on legacy bindings.
  generate_legacy_js_bindings = true
}
