Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/buildflag_header.gni") | |
| 6 import("//build/config/chromecast_build.gni") | |
|
raymes
2016/12/14 00:57:16
is this one needed?
brettw
2016/12/14 03:39:42
You're right, this was left over from a previous i
| |
| 5 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
| 8 import("//pdf/features.gni") | |
| 6 import("//testing/test.gni") | 9 import("//testing/test.gni") |
| 7 import("//third_party/pdfium/pdfium.gni") | 10 import("//third_party/pdfium/pdfium.gni") |
| 8 | 11 |
| 9 assert(enable_pdf) | 12 # Generate a buildflag header for compile-time checking of PDF support. |
| 13 buildflag_header("features") { | |
| 14 header = "features.h" | |
| 15 flags = [ "ENABLE_PDF=$enable_pdf" ] | |
| 16 } | |
| 10 | 17 |
| 11 pdf_engine = 0 # 0 PDFium | 18 if (enable_pdf) { |
| 19 pdf_engine = 0 # 0 PDFium | |
| 12 | 20 |
| 13 static_library("pdf") { | 21 static_library("pdf") { |
| 14 deps = [ | 22 deps = [ |
| 15 "//base", | 23 "//base", |
| 16 "//gin", | 24 "//gin", |
| 17 "//net", | 25 "//net", |
| 18 "//ppapi/cpp:objects", | 26 "//ppapi/cpp:objects", |
| 19 "//ppapi/cpp/private:internal_module", | 27 "//ppapi/cpp/private:internal_module", |
| 20 "//ui/base", | 28 "//ui/base", |
| 21 ] | |
| 22 | |
| 23 sources = [ | |
| 24 "chunk_stream.cc", | |
| 25 "chunk_stream.h", | |
| 26 "document_loader.cc", | |
| 27 "document_loader.h", | |
| 28 "draw_utils.cc", | |
| 29 "draw_utils.h", | |
| 30 "out_of_process_instance.cc", | |
| 31 "out_of_process_instance.h", | |
| 32 "paint_aggregator.cc", | |
| 33 "paint_aggregator.h", | |
| 34 "paint_manager.cc", | |
| 35 "paint_manager.h", | |
| 36 "pdf.cc", | |
| 37 "pdf.h", | |
| 38 "pdf_engine.h", | |
| 39 "preview_mode_client.cc", | |
| 40 "preview_mode_client.h", | |
| 41 ] | |
| 42 | |
| 43 if (pdf_engine == 0) { | |
| 44 deps += [ | |
| 45 "//pdf/pdfium/fuzzers", | |
| 46 "//third_party/pdfium", | |
| 47 ] | 29 ] |
| 48 | 30 |
| 49 sources += [ | 31 sources = [ |
| 50 "pdfium/pdfium_api_string_buffer_adapter.cc", | 32 "chunk_stream.cc", |
| 51 "pdfium/pdfium_api_string_buffer_adapter.h", | 33 "chunk_stream.h", |
| 52 "pdfium/pdfium_assert_matching_enums.cc", | 34 "document_loader.cc", |
| 53 "pdfium/pdfium_engine.cc", | 35 "document_loader.h", |
| 54 "pdfium/pdfium_engine.h", | 36 "draw_utils.cc", |
| 55 "pdfium/pdfium_mem_buffer_file_read.cc", | 37 "draw_utils.h", |
| 56 "pdfium/pdfium_mem_buffer_file_read.h", | 38 "out_of_process_instance.cc", |
| 57 "pdfium/pdfium_mem_buffer_file_write.cc", | 39 "out_of_process_instance.h", |
| 58 "pdfium/pdfium_mem_buffer_file_write.h", | 40 "paint_aggregator.cc", |
| 59 "pdfium/pdfium_page.cc", | 41 "paint_aggregator.h", |
| 60 "pdfium/pdfium_page.h", | 42 "paint_manager.cc", |
| 61 "pdfium/pdfium_range.cc", | 43 "paint_manager.h", |
| 62 "pdfium/pdfium_range.h", | 44 "pdf.cc", |
| 45 "pdf.h", | |
| 46 "pdf_engine.h", | |
| 47 "preview_mode_client.cc", | |
| 48 "preview_mode_client.h", | |
| 49 ] | |
| 50 | |
| 51 if (pdf_engine == 0) { | |
| 52 deps += [ | |
| 53 "//pdf/pdfium/fuzzers", | |
| 54 "//third_party/pdfium", | |
| 55 ] | |
| 56 | |
| 57 sources += [ | |
| 58 "pdfium/pdfium_api_string_buffer_adapter.cc", | |
| 59 "pdfium/pdfium_api_string_buffer_adapter.h", | |
| 60 "pdfium/pdfium_assert_matching_enums.cc", | |
| 61 "pdfium/pdfium_engine.cc", | |
| 62 "pdfium/pdfium_engine.h", | |
| 63 "pdfium/pdfium_mem_buffer_file_read.cc", | |
| 64 "pdfium/pdfium_mem_buffer_file_read.h", | |
| 65 "pdfium/pdfium_mem_buffer_file_write.cc", | |
| 66 "pdfium/pdfium_mem_buffer_file_write.h", | |
| 67 "pdfium/pdfium_page.cc", | |
| 68 "pdfium/pdfium_page.h", | |
| 69 "pdfium/pdfium_range.cc", | |
| 70 "pdfium/pdfium_range.h", | |
| 71 ] | |
| 72 } | |
| 73 | |
| 74 defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] | |
| 75 if (pdf_enable_xfa) { | |
| 76 defines += [ "PDF_ENABLE_XFA" ] | |
| 77 } | |
| 78 } | |
| 79 | |
| 80 test("pdf_unittests") { | |
| 81 sources = [ | |
| 82 "chunk_stream_unittest.cc", | |
| 83 "run_all_unittests.cc", | |
| 84 ] | |
| 85 | |
| 86 deps = [ | |
| 87 ":pdf", | |
| 88 "//base", | |
| 89 "//base/test:test_support", | |
| 90 "//ppapi/c", | |
| 91 "//ppapi/cpp", | |
| 92 "//testing/gmock", | |
| 93 "//testing/gtest", | |
| 63 ] | 94 ] |
| 64 } | 95 } |
| 65 | 96 } else { |
| 66 defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] | 97 # Dummy group when PDF support is disabled so targets can unconditionally |
| 67 if (pdf_enable_xfa) { | 98 # depend on it. |
| 68 defines += [ "PDF_ENABLE_XFA" ] | 99 group("pdf") { |
| 69 } | 100 } |
| 70 } | 101 } |
| 71 | |
| 72 test("pdf_unittests") { | |
| 73 sources = [ | |
| 74 "chunk_stream_unittest.cc", | |
| 75 "run_all_unittests.cc", | |
| 76 ] | |
| 77 | |
| 78 deps = [ | |
| 79 ":pdf", | |
| 80 "//base", | |
| 81 "//base/test:test_support", | |
| 82 "//ppapi/c", | |
| 83 "//ppapi/cpp", | |
| 84 "//testing/gmock", | |
| 85 "//testing/gtest", | |
| 86 ] | |
| 87 } | |
| OLD | NEW |