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 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 3597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3608 | 3608 |
3609 void PDFiumEngine::Form_Mail(IPDF_JSPLATFORM* param, | 3609 void PDFiumEngine::Form_Mail(IPDF_JSPLATFORM* param, |
3610 void* mail_data, | 3610 void* mail_data, |
3611 int length, | 3611 int length, |
3612 FPDF_BOOL ui, | 3612 FPDF_BOOL ui, |
3613 FPDF_WIDESTRING to, | 3613 FPDF_WIDESTRING to, |
3614 FPDF_WIDESTRING subject, | 3614 FPDF_WIDESTRING subject, |
3615 FPDF_WIDESTRING cc, | 3615 FPDF_WIDESTRING cc, |
3616 FPDF_WIDESTRING bcc, | 3616 FPDF_WIDESTRING bcc, |
3617 FPDF_WIDESTRING message) { | 3617 FPDF_WIDESTRING message) { |
3618 DCHECK(length == 0); // Don't handle attachments; no way with mailto. | 3618 // Note: |mail_data| and |length| are ignored. We don't handle attachments; |
| 3619 // there is no way with mailto. |
3619 std::string to_str = | 3620 std::string to_str = |
3620 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(to)); | 3621 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(to)); |
3621 std::string cc_str = | 3622 std::string cc_str = |
3622 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(cc)); | 3623 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(cc)); |
3623 std::string bcc_str = | 3624 std::string bcc_str = |
3624 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(bcc)); | 3625 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(bcc)); |
3625 std::string subject_str = | 3626 std::string subject_str = |
3626 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(subject)); | 3627 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(subject)); |
3627 std::string message_str = | 3628 std::string message_str = |
3628 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(message)); | 3629 base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(message)); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3915 double* height) { | 3916 double* height) { |
3916 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); | 3917 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); |
3917 if (!doc) | 3918 if (!doc) |
3918 return false; | 3919 return false; |
3919 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 3920 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
3920 FPDF_CloseDocument(doc); | 3921 FPDF_CloseDocument(doc); |
3921 return success; | 3922 return success; |
3922 } | 3923 } |
3923 | 3924 |
3924 } // namespace chrome_pdf | 3925 } // namespace chrome_pdf |
OLD | NEW |