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 #ifndef PDF_PDFIUM_PDFIUM_ENGINE_H_ | 5 #ifndef PDF_PDFIUM_PDFIUM_ENGINE_H_ |
6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_ | 6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 FPDF_BOOL print_as_image, | 466 FPDF_BOOL print_as_image, |
467 FPDF_BOOL reverse, | 467 FPDF_BOOL reverse, |
468 FPDF_BOOL annotations); | 468 FPDF_BOOL annotations); |
469 static void Form_SubmitForm(IPDF_JSPLATFORM* param, | 469 static void Form_SubmitForm(IPDF_JSPLATFORM* param, |
470 void* form_data, | 470 void* form_data, |
471 int length, | 471 int length, |
472 FPDF_WIDESTRING url); | 472 FPDF_WIDESTRING url); |
473 static void Form_GotoPage(IPDF_JSPLATFORM* param, int page_number); | 473 static void Form_GotoPage(IPDF_JSPLATFORM* param, int page_number); |
474 static int Form_Browse(IPDF_JSPLATFORM* param, void* file_path, int length); | 474 static int Form_Browse(IPDF_JSPLATFORM* param, void* file_path, int length); |
475 | 475 |
| 476 #ifdef PDF_USE_XFA |
| 477 static void Form_EmailTo(FPDF_FORMFILLINFO* param, |
| 478 FPDF_FILEHANDLER* file_handler, |
| 479 FPDF_WIDESTRING to, |
| 480 FPDF_WIDESTRING subject, |
| 481 FPDF_WIDESTRING cc, |
| 482 FPDF_WIDESTRING bcc, |
| 483 FPDF_WIDESTRING message); |
| 484 static void Form_DisplayCaret(FPDF_FORMFILLINFO* param, |
| 485 FPDF_PAGE page, |
| 486 FPDF_BOOL visible, |
| 487 double left, |
| 488 double top, |
| 489 double right, |
| 490 double bottom); |
| 491 static void Form_SetCurrentPage(FPDF_FORMFILLINFO* param, |
| 492 FPDF_DOCUMENT document, |
| 493 int page); |
| 494 static int Form_GetCurrentPageIndex(FPDF_FORMFILLINFO* param, |
| 495 FPDF_DOCUMENT document); |
| 496 static void Form_GetPageViewRect(FPDF_FORMFILLINFO* param, |
| 497 FPDF_PAGE page, |
| 498 double* left, |
| 499 double* top, |
| 500 double* right, |
| 501 double* bottom); |
| 502 static int Form_GetPlatform(FPDF_FORMFILLINFO* param, |
| 503 void* platform, |
| 504 int length); |
| 505 static FPDF_BOOL Form_PopupMenu(FPDF_FORMFILLINFO* param, |
| 506 FPDF_PAGE page, |
| 507 FPDF_WIDGET widget, |
| 508 int menu_flag, |
| 509 float x, |
| 510 float y); |
| 511 static FPDF_BOOL Form_PostRequestURL(FPDF_FORMFILLINFO* param, |
| 512 FPDF_WIDESTRING url, |
| 513 FPDF_WIDESTRING data, |
| 514 FPDF_WIDESTRING content_type, |
| 515 FPDF_WIDESTRING encode, |
| 516 FPDF_WIDESTRING header, |
| 517 FPDF_BSTR* response); |
| 518 static FPDF_BOOL Form_PutRequestURL(FPDF_FORMFILLINFO* param, |
| 519 FPDF_WIDESTRING url, |
| 520 FPDF_WIDESTRING data, |
| 521 FPDF_WIDESTRING encode); |
| 522 static void Form_UploadTo(FPDF_FORMFILLINFO* param, |
| 523 FPDF_FILEHANDLER* file_handler, |
| 524 int file_flag, |
| 525 FPDF_WIDESTRING dest); |
| 526 static FPDF_LPFILEHANDLER Form_DownloadFromURL(FPDF_FORMFILLINFO* param, |
| 527 FPDF_WIDESTRING url); |
| 528 static FPDF_FILEHANDLER* Form_OpenFile(FPDF_FORMFILLINFO* param, |
| 529 int file_flag, |
| 530 FPDF_WIDESTRING url, |
| 531 const char* mode); |
| 532 static void Form_GotoURL(FPDF_FORMFILLINFO* param, |
| 533 FPDF_DOCUMENT document, |
| 534 FPDF_WIDESTRING url); |
| 535 static int Form_GetLanguage(FPDF_FORMFILLINFO* param, |
| 536 void* language, |
| 537 int length); |
| 538 #endif // PDF_USE_XFA |
| 539 |
476 // IFSDK_PAUSE callbacks | 540 // IFSDK_PAUSE callbacks |
477 static FPDF_BOOL Pause_NeedToPauseNow(IFSDK_PAUSE* param); | 541 static FPDF_BOOL Pause_NeedToPauseNow(IFSDK_PAUSE* param); |
478 | 542 |
479 PDFEngine::Client* client_; | 543 PDFEngine::Client* client_; |
480 pp::Size document_size_; // Size of document in pixels. | 544 pp::Size document_size_; // Size of document in pixels. |
481 | 545 |
482 // The scroll position in screen coordinates. | 546 // The scroll position in screen coordinates. |
483 pp::Point position_; | 547 pp::Point position_; |
484 // The offset of the page into the viewport. | 548 // The offset of the page into the viewport. |
485 pp::Point page_offset_; | 549 pp::Point page_offset_; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 713 |
650 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 714 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
651 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 715 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
652 int pdf_buffer_size, int page_number, | 716 int pdf_buffer_size, int page_number, |
653 double* width, double* height); | 717 double* width, double* height); |
654 }; | 718 }; |
655 | 719 |
656 } // namespace chrome_pdf | 720 } // namespace chrome_pdf |
657 | 721 |
658 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 722 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
OLD | NEW |