chromium/components/navigation_interception/BUILD.gn

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

if (is_android) {
  import("//build/config/android/rules.gni")
  import("//third_party/jni_zero/jni_zero.gni")
}

static_library("navigation_interception") {
  sources = [
    "intercept_navigation_throttle.cc",
    "intercept_navigation_throttle.h",
  ]

  deps = [
    "//base",
    "//content/public/browser",
    "//content/public/common",
    "//net",
    "//ui/base",
  ]

  if (is_android) {
    sources += [
      "intercept_navigation_delegate.cc",
      "intercept_navigation_delegate.h",
    ]
    deps += [
      ":jni_headers",
      "//url",
    ]
  }
}

if (is_android) {
  generate_jni("jni_headers") {
    sources = [ "android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java" ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [ "intercept_navigation_throttle_unittest.cc" ]
  deps = [
    ":navigation_interception",
    "//base",
    "//base/test:test_support",
    "//content/public/browser",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}