Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: pdf/pdfium/pdfium_engine.h

Issue 874663006: Make the PDF viewer background color a property of the instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual void StopFind(); 73 virtual void StopFind();
74 virtual void ZoomUpdated(double new_zoom_level); 74 virtual void ZoomUpdated(double new_zoom_level);
75 virtual void RotateClockwise(); 75 virtual void RotateClockwise();
76 virtual void RotateCounterclockwise(); 76 virtual void RotateCounterclockwise();
77 virtual std::string GetSelectedText(); 77 virtual std::string GetSelectedText();
78 virtual std::string GetLinkAtPosition(const pp::Point& point); 78 virtual std::string GetLinkAtPosition(const pp::Point& point);
79 virtual bool IsSelecting(); 79 virtual bool IsSelecting();
80 virtual bool HasPermission(DocumentPermission permission) const; 80 virtual bool HasPermission(DocumentPermission permission) const;
81 virtual void SelectAll(); 81 virtual void SelectAll();
82 virtual int GetNumberOfPages(); 82 virtual int GetNumberOfPages();
83 virtual uint32 GetBackgroundColor();
84 virtual void SetBackgroundColor(uint32 backgroundColor);
85 virtual pp::VarArray GetBookmarks(); 83 virtual pp::VarArray GetBookmarks();
86 virtual int GetNamedDestinationPage(const std::string& destination); 84 virtual int GetNamedDestinationPage(const std::string& destination);
87 virtual pp::VarDictionary GetNamedDestinations(); 85 virtual pp::VarDictionary GetNamedDestinations();
88 virtual int GetFirstVisiblePage(); 86 virtual int GetFirstVisiblePage();
89 virtual int GetMostVisiblePage(); 87 virtual int GetMostVisiblePage();
90 virtual pp::Rect GetPageRect(int index); 88 virtual pp::Rect GetPageRect(int index);
91 virtual pp::Rect GetPageContentsRect(int index); 89 virtual pp::Rect GetPageContentsRect(int index);
92 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } 90 virtual int GetVerticalScrollbarYPosition() { return position_.y(); }
93 virtual void PaintThumbnail(pp::ImageData* image_data, int index); 91 virtual void PaintThumbnail(pp::ImageData* image_data, int index);
94 virtual void SetGrayscale(bool grayscale); 92 virtual void SetGrayscale(bool grayscale);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 // been called. Only after that can we call FORM_DoPageAAction. 674 // been called. Only after that can we call FORM_DoPageAAction.
677 bool called_do_document_action_; 675 bool called_do_document_action_;
678 676
679 // Records parts of form fields that need to be highlighted at next paint, in 677 // Records parts of form fields that need to be highlighted at next paint, in
680 // screen coordinates. 678 // screen coordinates.
681 std::vector<pp::Rect> form_highlights_; 679 std::vector<pp::Rect> form_highlights_;
682 680
683 // Whether to render in grayscale or in color. 681 // Whether to render in grayscale or in color.
684 bool render_grayscale_; 682 bool render_grayscale_;
685 683
686 // Background color of the PDF.
687 uint32 background_color_;
688
689 // The link currently under the cursor. 684 // The link currently under the cursor.
690 std::string link_under_cursor_; 685 std::string link_under_cursor_;
691 686
692 // Pending progressive paints. 687 // Pending progressive paints.
693 struct ProgressivePaint { 688 struct ProgressivePaint {
694 pp::Rect rect; // In screen coordinates. 689 pp::Rect rect; // In screen coordinates.
695 FPDF_BITMAP bitmap; 690 FPDF_BITMAP bitmap;
696 int page_index; 691 int page_index;
697 // Temporary used to figure out if in a series of Paint() calls whether this 692 // Temporary used to figure out if in a series of Paint() calls whether this
698 // pending paint was updated or not. 693 // pending paint was updated or not.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 747
753 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 748 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
754 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 749 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
755 int pdf_buffer_size, int page_number, 750 int pdf_buffer_size, int page_number,
756 double* width, double* height); 751 double* width, double* height);
757 }; 752 };
758 753
759 } // namespace chrome_pdf 754 } // namespace chrome_pdf
760 755
761 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ 756 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_
OLDNEW
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698