| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "pdf/pdfium/pdfium_engine.h" | 5 #include "pdf/pdfium/pdfium_engine.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <set> | 13 #include <set> |
| 14 | 14 |
| 15 #include "base/i18n/encoding_detection.h" | 15 #include "base/i18n/encoding_detection.h" |
| 16 #include "base/i18n/icu_string_conversions.h" | 16 #include "base/i18n/icu_string_conversions.h" |
| 17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
| 18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/ptr_util.h" |
| 20 #include "base/numerics/safe_conversions.h" | 21 #include "base/numerics/safe_conversions.h" |
| 21 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
| 22 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/strings/string_piece.h" | 24 #include "base/strings/string_piece.h" |
| 24 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
| 25 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
| 26 #include "gin/array_buffer.h" | 27 #include "gin/array_buffer.h" |
| 27 #include "gin/public/gin_embedders.h" | 28 #include "gin/public/gin_embedders.h" |
| 28 #include "gin/public/isolate_holder.h" | 29 #include "gin/public/isolate_holder.h" |
| 29 #include "pdf/draw_utils.h" | 30 #include "pdf/draw_utils.h" |
| (...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4005 FPDF_DOCUMENT doc = | 4006 FPDF_DOCUMENT doc = |
| 4006 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); | 4007 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); |
| 4007 if (!doc) | 4008 if (!doc) |
| 4008 return false; | 4009 return false; |
| 4009 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 4010 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
| 4010 FPDF_CloseDocument(doc); | 4011 FPDF_CloseDocument(doc); |
| 4011 return success; | 4012 return success; |
| 4012 } | 4013 } |
| 4013 | 4014 |
| 4014 } // namespace chrome_pdf | 4015 } // namespace chrome_pdf |
| OLD | NEW |