chromium/components/no_state_prefetch/common/BUILD.gn

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

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

static_library("common") {
  sources = [
    "no_state_prefetch_final_status.cc",
    "no_state_prefetch_final_status.h",
    "no_state_prefetch_origin.cc",
    "no_state_prefetch_origin.h",
    "no_state_prefetch_url_loader_throttle.cc",
    "no_state_prefetch_url_loader_throttle.h",
    "no_state_prefetch_utils.cc",
    "no_state_prefetch_utils.h",
  ]
  deps = [
    ":mojo_bindings",
    "//content/public/common:common",
    "//extensions/buildflags",
    "//ipc",
    "//ipc:message_support",
    "//ipc:param_traits",
    "//services/network/public/mojom",
    "//ui/gfx",
    "//url",
  ]

  if (enable_extensions) {
    deps += [ "//extensions/common:common_constants" ]
  }
}

mojom("mojo_bindings") {
  sources = [
    "prerender_canceler.mojom",
    "render_frame_prerender_messages.mojom",
  ]
  deps = [ "//url/mojom:url_mojom_gurl" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "no_state_prefetch_url_loader_throttle_unittest.cc" ]

  deps = [
    ":mojo_bindings",
    "//base",
    "//components/no_state_prefetch/common",
    "//content/test:test_support",
    "//testing/gtest",
    "//url:url",
  ]
}