| 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 |
| (...skipping 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3550 FPDF_WIDESTRING value, | 3550 FPDF_WIDESTRING value, |
| 3551 FPDF_DWORD valueLen, | 3551 FPDF_DWORD valueLen, |
| 3552 FPDF_BOOL is_focus) { | 3552 FPDF_BOOL is_focus) { |
| 3553 // Do nothing for now. | 3553 // Do nothing for now. |
| 3554 // TODO(gene): use this signal to trigger OSK. | 3554 // TODO(gene): use this signal to trigger OSK. |
| 3555 } | 3555 } |
| 3556 | 3556 |
| 3557 void PDFiumEngine::Form_DoURIAction(FPDF_FORMFILLINFO* param, | 3557 void PDFiumEngine::Form_DoURIAction(FPDF_FORMFILLINFO* param, |
| 3558 FPDF_BYTESTRING uri) { | 3558 FPDF_BYTESTRING uri) { |
| 3559 PDFiumEngine* engine = static_cast<PDFiumEngine*>(param); | 3559 PDFiumEngine* engine = static_cast<PDFiumEngine*>(param); |
| 3560 engine->client_->NavigateTo(std::string(uri), CURRENT_TAB); | 3560 engine->client_->NavigateTo(std::string(uri), |
| 3561 WindowOpenDisposition::CURRENT_TAB); |
| 3561 } | 3562 } |
| 3562 | 3563 |
| 3563 void PDFiumEngine::Form_DoGoToAction(FPDF_FORMFILLINFO* param, | 3564 void PDFiumEngine::Form_DoGoToAction(FPDF_FORMFILLINFO* param, |
| 3564 int page_index, | 3565 int page_index, |
| 3565 int zoom_mode, | 3566 int zoom_mode, |
| 3566 float* position_array, | 3567 float* position_array, |
| 3567 int size_of_array) { | 3568 int size_of_array) { |
| 3568 PDFiumEngine* engine = static_cast<PDFiumEngine*>(param); | 3569 PDFiumEngine* engine = static_cast<PDFiumEngine*>(param); |
| 3569 engine->ScrollToPage(page_index); | 3570 engine->ScrollToPage(page_index); |
| 3570 } | 3571 } |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3971 FPDF_DOCUMENT doc = | 3972 FPDF_DOCUMENT doc = |
| 3972 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); | 3973 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); |
| 3973 if (!doc) | 3974 if (!doc) |
| 3974 return false; | 3975 return false; |
| 3975 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 3976 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
| 3976 FPDF_CloseDocument(doc); | 3977 FPDF_CloseDocument(doc); |
| 3977 return success; | 3978 return success; |
| 3978 } | 3979 } |
| 3979 | 3980 |
| 3980 } // namespace chrome_pdf | 3981 } // namespace chrome_pdf |
| OLD | NEW |