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/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//testing/test.gni") | |
7 import("//third_party/pdfium/pdfium.gni") | 6 import("//third_party/pdfium/pdfium.gni") |
8 | 7 |
9 assert(enable_pdf) | 8 assert(enable_pdf) |
10 | 9 |
11 pdf_engine = 0 # 0 PDFium | 10 pdf_engine = 0 # 0 PDFium |
12 | 11 |
13 static_library("pdf") { | 12 static_library("pdf") { |
14 deps = [ | 13 deps = [ |
15 "//base", | 14 "//base", |
16 "//gin", | 15 "//gin", |
17 "//net", | 16 "//net", |
18 "//ppapi/cpp:objects", | 17 "//ppapi/cpp:objects", |
19 "//ppapi/cpp/private:internal_module", | 18 "//ppapi/cpp/private:internal_module", |
20 "//ui/base", | 19 "//ui/base", |
21 "//ui/gfx/range", | |
22 ] | 20 ] |
23 | 21 |
24 sources = [ | 22 sources = [ |
| 23 "chunk_stream.cc", |
25 "chunk_stream.h", | 24 "chunk_stream.h", |
26 "document_loader.cc", | 25 "document_loader.cc", |
27 "document_loader.h", | 26 "document_loader.h", |
28 "draw_utils.cc", | 27 "draw_utils.cc", |
29 "draw_utils.h", | 28 "draw_utils.h", |
30 "out_of_process_instance.cc", | 29 "out_of_process_instance.cc", |
31 "out_of_process_instance.h", | 30 "out_of_process_instance.h", |
32 "paint_aggregator.cc", | 31 "paint_aggregator.cc", |
33 "paint_aggregator.h", | 32 "paint_aggregator.h", |
34 "paint_manager.cc", | 33 "paint_manager.cc", |
35 "paint_manager.h", | 34 "paint_manager.h", |
36 "pdf.cc", | 35 "pdf.cc", |
37 "pdf.h", | 36 "pdf.h", |
38 "pdf_engine.h", | 37 "pdf_engine.h", |
39 "preview_mode_client.cc", | 38 "preview_mode_client.cc", |
40 "preview_mode_client.h", | 39 "preview_mode_client.h", |
41 "range_set.cc", | |
42 "range_set.h", | |
43 "timer.cc", | |
44 "timer.h", | |
45 "url_loader_wrapper.h", | |
46 "url_loader_wrapper_impl.cc", | |
47 "url_loader_wrapper_impl.h", | |
48 ] | 40 ] |
49 | 41 |
50 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 42 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
51 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 43 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
52 | 44 |
53 if (pdf_engine == 0) { | 45 if (pdf_engine == 0) { |
54 deps += [ | 46 deps += [ |
55 "//pdf/pdfium/fuzzers", | 47 "//pdf/pdfium/fuzzers", |
56 "//third_party/pdfium", | 48 "//third_party/pdfium", |
57 ] | 49 ] |
(...skipping 13 matching lines...) Expand all Loading... |
71 "pdfium/pdfium_range.cc", | 63 "pdfium/pdfium_range.cc", |
72 "pdfium/pdfium_range.h", | 64 "pdfium/pdfium_range.h", |
73 ] | 65 ] |
74 } | 66 } |
75 | 67 |
76 defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] | 68 defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] |
77 if (pdf_enable_xfa) { | 69 if (pdf_enable_xfa) { |
78 defines += [ "PDF_ENABLE_XFA" ] | 70 defines += [ "PDF_ENABLE_XFA" ] |
79 } | 71 } |
80 } | 72 } |
81 | |
82 test("pdf_unittests") { | |
83 sources = [ | |
84 "chunk_stream_unittest.cc", | |
85 "document_loader_unittest.cc", | |
86 "range_set_unittest.cc", | |
87 "run_all_unittests.cc", | |
88 ] | |
89 | |
90 deps = [ | |
91 ":pdf", | |
92 "//base", | |
93 "//base/test:test_support", | |
94 "//ppapi/c", | |
95 "//ppapi/cpp", | |
96 "//testing/gmock", | |
97 "//testing/gtest", | |
98 "//ui/gfx/range", | |
99 ] | |
100 } | |
OLD | NEW |