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

# Copyright 2019 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("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

  sources = [
    "blob_storage_context.mojom",
    "cache_storage_control.mojom",
    "file_system_access_context.mojom",
    "local_storage_control.mojom",
    "origin_context.mojom",
    "partition.mojom",
    "quota_client.mojom",
    "service_worker_database.mojom",
    "service_worker_storage_control.mojom",
    "session_storage_control.mojom",
    "storage_policy_update.mojom",
    "storage_service.mojom",
    "storage_usage_info.mojom",
  ]

  public_deps = [
    "//components/services/storage/public/mojom/buckets",
    "//components/services/storage/public/mojom/filesystem",
    "//mojo/public/mojom/base",
    "//sandbox/policy/mojom",
    "//services/network/public/mojom",
    "//third_party/blink/public/mojom:mojom_core",
    "//third_party/blink/public/mojom:mojom_modules",
    "//third_party/blink/public/mojom:mojom_platform",
    "//url/mojom:url_mojom_origin",
  ]

  overridden_deps = [
    "//third_party/blink/public/mojom:mojom_core",
    "//third_party/blink/public/mojom:mojom_modules",
    "//third_party/blink/public/mojom:mojom_platform",
  ]
  component_deps = [ "//third_party/blink/public/common" ]

  enabled_features = []
  if (is_linux || is_chromeos) {
    enabled_features += [ "is_linux_or_chromeos" ]
  }
  if (!is_android) {
    enabled_features += [ "is_not_android" ]
  }
}

mojom("test_api") {
  testonly = true
  sources = [ "test_api.test-mojom" ]
}

source_set("tests") {
  testonly = true
  sources = [
    "buckets/bucket_id_mojom_traits_unittest.cc",
    "buckets/bucket_info_mojom_traits_unittest.cc",
    "buckets/bucket_locator_mojom_traits_unittest.cc",
  ]
  deps = [
    "//components/services/storage/public/cpp/buckets",
    "//components/services/storage/public/mojom/buckets",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/test_support:test_utils",
    "//testing/gtest",
  ]
}