| # Copyright 2021 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("//pdf/features.gni") |
| |
| # enable_pdf is not required. Some platforms may not have PDF enabled, but some |
| # existing files still use the constants. |
| |
| source_set("constants") { |
| sources = [ "constants.h" ] |
| } |
| |
| source_set("util") { |
| sources = [ |
| "pdf_util.cc", |
| "pdf_util.h", |
| ] |
| |
| public_deps = [ "//skia" ] |
| |
| deps = [ |
| "//base", |
| "//content/public/common", |
| "//extensions/buildflags", |
| "//pdf:buildflags", |
| "//url", |
| ] |
| |
| if (enable_extensions) { |
| deps += [ "//extensions/common:common_constants" ] |
| } |
| |
| if (enable_pdf) { |
| deps += [ "//pdf:features" ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ "pdf_util_unittest.cc" ] |
| |
| deps = [ |
| ":util", |
| "//extensions/buildflags", |
| "//testing/gtest", |
| "//url", |
| ] |
| } |