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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 int start_char_index, | 97 int start_char_index, |
98 uint32_t* out_len, | 98 uint32_t* out_len, |
99 double* out_font_size, | 99 double* out_font_size, |
100 pp::FloatRect* out_bounds) override; | 100 pp::FloatRect* out_bounds) override; |
101 bool GetPrintScaling() override; | 101 bool GetPrintScaling() override; |
102 int GetCopiesToPrint() override; | 102 int GetCopiesToPrint() override; |
103 int GetDuplexType() override; | 103 int GetDuplexType() override; |
104 bool GetPageSizeAndUniformity(pp::Size* size) override; | 104 bool GetPageSizeAndUniformity(pp::Size* size) override; |
105 void AppendBlankPages(int num_pages) override; | 105 void AppendBlankPages(int num_pages) override; |
106 void AppendPage(PDFEngine* engine, int index) override; | 106 void AppendPage(PDFEngine* engine, int index) override; |
107 #if defined(PDF_USE_XFA) | 107 #if defined(PDF_ENABLE_XFA) |
108 virtual void SetScrollPosition(const pp::Point& position) = 0; | 108 void SetScrollPosition(const pp::Point& position) override; |
Lei Zhang
2016/08/22 21:32:08
copy+pasta error
| |
109 #endif | 109 #endif |
110 bool IsProgressiveLoad() override; | 110 bool IsProgressiveLoad() override; |
111 std::string GetMetadata(const std::string& key) override; | 111 std::string GetMetadata(const std::string& key) override; |
112 | 112 |
113 // DocumentLoader::Client implementation. | 113 // DocumentLoader::Client implementation. |
114 pp::Instance* GetPluginInstance() override; | 114 pp::Instance* GetPluginInstance() override; |
115 pp::URLLoader CreateURLLoader() override; | 115 pp::URLLoader CreateURLLoader() override; |
116 void OnPartialDocumentLoaded() override; | 116 void OnPartialDocumentLoaded() override; |
117 void OnPendingRequestComplete() override; | 117 void OnPendingRequestComplete() override; |
118 void OnNewDataAvailable() override; | 118 void OnNewDataAvailable() override; |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 FPDF_BOOL print_as_image, | 507 FPDF_BOOL print_as_image, |
508 FPDF_BOOL reverse, | 508 FPDF_BOOL reverse, |
509 FPDF_BOOL annotations); | 509 FPDF_BOOL annotations); |
510 static void Form_SubmitForm(IPDF_JSPLATFORM* param, | 510 static void Form_SubmitForm(IPDF_JSPLATFORM* param, |
511 void* form_data, | 511 void* form_data, |
512 int length, | 512 int length, |
513 FPDF_WIDESTRING url); | 513 FPDF_WIDESTRING url); |
514 static void Form_GotoPage(IPDF_JSPLATFORM* param, int page_number); | 514 static void Form_GotoPage(IPDF_JSPLATFORM* param, int page_number); |
515 static int Form_Browse(IPDF_JSPLATFORM* param, void* file_path, int length); | 515 static int Form_Browse(IPDF_JSPLATFORM* param, void* file_path, int length); |
516 | 516 |
517 #if defined(PDF_USE_XFA) | 517 #if defined(PDF_ENABLE_XFA) |
518 static void Form_EmailTo(FPDF_FORMFILLINFO* param, | 518 static void Form_EmailTo(FPDF_FORMFILLINFO* param, |
519 FPDF_FILEHANDLER* file_handler, | 519 FPDF_FILEHANDLER* file_handler, |
520 FPDF_WIDESTRING to, | 520 FPDF_WIDESTRING to, |
521 FPDF_WIDESTRING subject, | 521 FPDF_WIDESTRING subject, |
522 FPDF_WIDESTRING cc, | 522 FPDF_WIDESTRING cc, |
523 FPDF_WIDESTRING bcc, | 523 FPDF_WIDESTRING bcc, |
524 FPDF_WIDESTRING message); | 524 FPDF_WIDESTRING message); |
525 static void Form_DisplayCaret(FPDF_FORMFILLINFO* param, | 525 static void Form_DisplayCaret(FPDF_FORMFILLINFO* param, |
526 FPDF_PAGE page, | 526 FPDF_PAGE page, |
527 FPDF_BOOL visible, | 527 FPDF_BOOL visible, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
569 static FPDF_FILEHANDLER* Form_OpenFile(FPDF_FORMFILLINFO* param, | 569 static FPDF_FILEHANDLER* Form_OpenFile(FPDF_FORMFILLINFO* param, |
570 int file_flag, | 570 int file_flag, |
571 FPDF_WIDESTRING url, | 571 FPDF_WIDESTRING url, |
572 const char* mode); | 572 const char* mode); |
573 static void Form_GotoURL(FPDF_FORMFILLINFO* param, | 573 static void Form_GotoURL(FPDF_FORMFILLINFO* param, |
574 FPDF_DOCUMENT document, | 574 FPDF_DOCUMENT document, |
575 FPDF_WIDESTRING url); | 575 FPDF_WIDESTRING url); |
576 static int Form_GetLanguage(FPDF_FORMFILLINFO* param, | 576 static int Form_GetLanguage(FPDF_FORMFILLINFO* param, |
577 void* language, | 577 void* language, |
578 int length); | 578 int length); |
579 #endif // defined(PDF_USE_XFA) | 579 #endif // defined(PDF_ENABLE_XFA) |
580 | 580 |
581 // IFSDK_PAUSE callbacks | 581 // IFSDK_PAUSE callbacks |
582 static FPDF_BOOL Pause_NeedToPauseNow(IFSDK_PAUSE* param); | 582 static FPDF_BOOL Pause_NeedToPauseNow(IFSDK_PAUSE* param); |
583 | 583 |
584 PDFEngine::Client* const client_; | 584 PDFEngine::Client* const client_; |
585 pp::Size document_size_; // Size of document in pixels. | 585 pp::Size document_size_; // Size of document in pixels. |
586 | 586 |
587 // The scroll position in screen coordinates. | 587 // The scroll position in screen coordinates. |
588 pp::Point position_; | 588 pp::Point position_; |
589 // The offset of the page into the viewport. | 589 // The offset of the page into the viewport. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 755 bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
756 int pdf_buffer_size, | 756 int pdf_buffer_size, |
757 int page_number, | 757 int page_number, |
758 double* width, | 758 double* width, |
759 double* height) override; | 759 double* height) override; |
760 }; | 760 }; |
761 | 761 |
762 } // namespace chrome_pdf | 762 } // namespace chrome_pdf |
763 | 763 |
764 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 764 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
OLD | NEW |