Skip to content

Commit

Permalink
Fix build with PDF disabled
Browse files Browse the repository at this point in the history
Change-Id: Ifbbd62641914fbc60409dd72bfb84ea7f1e911df
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
  • Loading branch information
Allan Sandfeld Jensen authored and patricia-gallardo committed Feb 7, 2021
1 parent 54738c3 commit 1080424
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion chrome/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import("//components/offline_pages/buildflags/features.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//media/media_options.gni")
import("//pdf/features.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/grit_rule.gni")
Expand Down Expand Up @@ -240,7 +241,6 @@ static_library("renderer") {
"plugins/power_saver_info.h",
]
deps += [
"//components/pdf/renderer",
"//components/strings",
"//media:media_buildflags",
"//ppapi/host",
Expand All @@ -254,6 +254,12 @@ static_library("renderer") {
}
}

if (enable_pdf) {
deps += [
"//components/pdf/renderer",
]
}

if (enable_widevine_cdm_component) {
deps += [ "//third_party/widevine/cdm:headers" ]
}
Expand Down
5 changes: 3 additions & 2 deletions components/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import("//components/safe_browsing/buildflags.gni")
import("//components/ui_devtools/devtools.gni")
import("//extensions/buildflags/buildflags.gni")
import("//media/media_options.gni")
import("//pdf/features.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//rlz/buildflags/buildflags.gni")
Expand Down Expand Up @@ -459,7 +460,7 @@ test("components_unittests") {
]
}

if (enable_plugins) {
if (enable_plugins && enable_pdf) {
deps += [ "//components/pdf/renderer:unit_tests" ]
}

Expand Down Expand Up @@ -649,7 +650,7 @@ if (!is_ios && !is_fuchsia) {
data += [ "$root_out_dir/Content Shell.app/" ]
}

if (enable_plugins) {
if (enable_plugins && enable_pdf) {
sources += [
"pdf/browser/pdf_web_contents_helper_browsertest.cc",
"pdf/renderer/pdf_accessibility_tree_browsertest.cc",
Expand Down

0 comments on commit 1080424

Please sign in to comment.