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

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

Issue 871403005: Switch the background color in PDF Viewer when using Material Design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits 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);
83 virtual pp::VarArray GetBookmarks(); 85 virtual pp::VarArray GetBookmarks();
84 virtual int GetNamedDestinationPage(const std::string& destination); 86 virtual int GetNamedDestinationPage(const std::string& destination);
85 virtual pp::VarDictionary GetNamedDestinations(); 87 virtual pp::VarDictionary GetNamedDestinations();
86 virtual int GetFirstVisiblePage(); 88 virtual int GetFirstVisiblePage();
87 virtual int GetMostVisiblePage(); 89 virtual int GetMostVisiblePage();
88 virtual pp::Rect GetPageRect(int index); 90 virtual pp::Rect GetPageRect(int index);
89 virtual pp::Rect GetPageContentsRect(int index); 91 virtual pp::Rect GetPageContentsRect(int index);
90 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } 92 virtual int GetVerticalScrollbarYPosition() { return position_.y(); }
91 virtual void PaintThumbnail(pp::ImageData* image_data, int index); 93 virtual void PaintThumbnail(pp::ImageData* image_data, int index);
92 virtual void SetGrayscale(bool grayscale); 94 virtual void SetGrayscale(bool grayscale);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // been called. Only after that can we call FORM_DoPageAAction. 676 // been called. Only after that can we call FORM_DoPageAAction.
675 bool called_do_document_action_; 677 bool called_do_document_action_;
676 678
677 // Records parts of form fields that need to be highlighted at next paint, in 679 // Records parts of form fields that need to be highlighted at next paint, in
678 // screen coordinates. 680 // screen coordinates.
679 std::vector<pp::Rect> form_highlights_; 681 std::vector<pp::Rect> form_highlights_;
680 682
681 // Whether to render in grayscale or in color. 683 // Whether to render in grayscale or in color.
682 bool render_grayscale_; 684 bool render_grayscale_;
683 685
686 // Background color of the PDF.
687 uint32 background_color_;
Sam McNally 2015/02/02 00:50:52 Is this initialized anywhere?
Alexandre Carlton 2015/02/02 01:51:39 No, should it be initialised to 0xFFFFFFFF, or one
688
684 // The link currently under the cursor. 689 // The link currently under the cursor.
685 std::string link_under_cursor_; 690 std::string link_under_cursor_;
686 691
687 // Pending progressive paints. 692 // Pending progressive paints.
688 struct ProgressivePaint { 693 struct ProgressivePaint {
689 pp::Rect rect; // In screen coordinates. 694 pp::Rect rect; // In screen coordinates.
690 FPDF_BITMAP bitmap; 695 FPDF_BITMAP bitmap;
691 int page_index; 696 int page_index;
692 // Temporary used to figure out if in a series of Paint() calls whether this 697 // Temporary used to figure out if in a series of Paint() calls whether this
693 // pending paint was updated or not. 698 // pending paint was updated or not.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 752
748 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 753 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
749 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 754 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
750 int pdf_buffer_size, int page_number, 755 int pdf_buffer_size, int page_number,
751 double* width, double* height); 756 double* width, double* height);
752 }; 757 };
753 758
754 } // namespace chrome_pdf 759 } // namespace chrome_pdf
755 760
756 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ 761 #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