Commit 5e6dc3bc authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Separate pdf/pdf.* into its own target.

Since pdf/pdf.cc is just the implementation for an interface into the
internals code, separate it and its header out into a separate target.
Put the majority of the code in pdf/ into an "internal" target, since
that's what it is. To make the dependencies work out, also put
pdf/pdfium/pdfium_assert_matching_enums.cc into its own target.

Bug: 1103478
Change-Id: I95da94e55f1bddf957a26cece899d27222756584
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293457
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789713}
parent af549754
...@@ -23,6 +23,21 @@ if (enable_pdf) { ...@@ -23,6 +23,21 @@ if (enable_pdf) {
} }
static_library("pdf") { static_library("pdf") {
sources = [ "pdf.cc" ]
configs += [ ":pdf_common_config" ]
public = [ "pdf.h" ]
deps = [
":internal",
"//base",
]
}
source_set("internal") {
visibility = [ ":*" ]
sources = [ sources = [
"accessibility.cc", "accessibility.cc",
"accessibility.h", "accessibility.h",
...@@ -50,7 +65,6 @@ if (enable_pdf) { ...@@ -50,7 +65,6 @@ if (enable_pdf) {
"paint_manager.h", "paint_manager.h",
"paint_ready_rect.cc", "paint_ready_rect.cc",
"paint_ready_rect.h", "paint_ready_rect.h",
"pdf.cc",
"pdf_engine.h", "pdf_engine.h",
"pdf_init.cc", "pdf_init.cc",
"pdf_init.h", "pdf_init.h",
...@@ -58,7 +72,6 @@ if (enable_pdf) { ...@@ -58,7 +72,6 @@ if (enable_pdf) {
"pdf_transform.h", "pdf_transform.h",
"pdfium/pdfium_api_string_buffer_adapter.cc", "pdfium/pdfium_api_string_buffer_adapter.cc",
"pdfium/pdfium_api_string_buffer_adapter.h", "pdfium/pdfium_api_string_buffer_adapter.h",
"pdfium/pdfium_assert_matching_enums.cc",
"pdfium/pdfium_document.cc", "pdfium/pdfium_document.cc",
"pdfium/pdfium_document.h", "pdfium/pdfium_document.h",
"pdfium/pdfium_engine.cc", "pdfium/pdfium_engine.cc",
...@@ -100,14 +113,6 @@ if (enable_pdf) { ...@@ -100,14 +113,6 @@ if (enable_pdf) {
configs += [ ":pdf_common_config" ] configs += [ ":pdf_common_config" ]
public = [ "pdf.h" ]
friend = [
":pdf_unittests",
":pdf_test_utils",
":pdf_ppapi",
]
deps = [ deps = [
":features", ":features",
"//base", "//base",
...@@ -132,6 +137,22 @@ if (enable_pdf) { ...@@ -132,6 +137,22 @@ if (enable_pdf) {
} }
} }
source_set("assert_enums") {
visibility = [ ":*" ]
sources = [ "pdfium/pdfium_assert_matching_enums.cc" ]
configs += [ ":pdf_common_config" ]
deps = [
":internal",
":pdf",
"//ppapi/c",
"//third_party/pdfium",
"//ui/base",
]
}
component("pdf_ppapi") { component("pdf_ppapi") {
sources = [ "pdf_ppapi.cc" ] sources = [ "pdf_ppapi.cc" ]
...@@ -142,6 +163,7 @@ if (enable_pdf) { ...@@ -142,6 +163,7 @@ if (enable_pdf) {
public = [ "pdf_ppapi.h" ] public = [ "pdf_ppapi.h" ]
deps = [ deps = [
":internal",
":pdf", ":pdf",
"//base", "//base",
"//ppapi/cpp:objects", "//ppapi/cpp:objects",
...@@ -178,7 +200,7 @@ if (enable_pdf) { ...@@ -178,7 +200,7 @@ if (enable_pdf) {
configs += [ "//build/config/compiler:noshadowing" ] configs += [ "//build/config/compiler:noshadowing" ]
deps = [ deps = [
":pdf", ":internal",
"//base", "//base",
"//ppapi/cpp:objects", "//ppapi/cpp:objects",
"//testing/gtest", "//testing/gtest",
...@@ -219,7 +241,9 @@ if (enable_pdf) { ...@@ -219,7 +241,9 @@ if (enable_pdf) {
data = [ "test/data/" ] data = [ "test/data/" ]
deps = [ deps = [
":assert_enums",
":features", ":features",
":internal",
":pdf", ":pdf",
":pdf_test_utils", ":pdf_test_utils",
"//base", "//base",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment