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

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

Issue 1550193002: Simplify PDFiumEngine::CheckPageAvailable(). Base URL: https://chromium.googlesource.com/chromium/src.git@pdfload
Patch Set: more Created 4 years, 12 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/pdfium/pdfium_engine.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_PAGE_H_ 5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_
6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ 6 #define PDF_PDFIUM_PDFIUM_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 double left, 78 double left,
79 double top, 79 double top,
80 double right, 80 double right,
81 double bottom, 81 double bottom,
82 int rotation); 82 int rotation);
83 83
84 int index() const { return index_; } 84 int index() const { return index_; }
85 pp::Rect rect() const { return rect_; } 85 pp::Rect rect() const { return rect_; }
86 void set_rect(const pp::Rect& r) { rect_ = r; } 86 void set_rect(const pp::Rect& r) { rect_ = r; }
87 bool available() const { return available_; } 87 bool available() const { return available_; }
88 void set_available(bool available) { available_ = available; } 88 void set_as_available() { available_ = true; }
89 void set_calculated_links(bool calculated_links) { 89 void set_calculated_links(bool calculated_links) {
90 calculated_links_ = calculated_links; 90 calculated_links_ = calculated_links;
91 } 91 }
92 92
93 private: 93 private:
94 // Returns a link index if the given character index is over a link, or -1 94 // Returns a link index if the given character index is over a link, or -1
95 // otherwise. 95 // otherwise.
96 int GetLink(int char_index, LinkTarget* target); 96 int GetLink(int char_index, LinkTarget* target);
97 // Returns the link indices if the given rect intersects a link rect, or an 97 // Returns the link indices if the given rect intersects a link rect, or an
98 // empty vector otherwise. 98 // empty vector otherwise.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int loading_count_; 137 int loading_count_;
138 pp::Rect rect_; 138 pp::Rect rect_;
139 bool calculated_links_; 139 bool calculated_links_;
140 std::vector<Link> links_; 140 std::vector<Link> links_;
141 bool available_; 141 bool available_;
142 }; 142 };
143 143
144 } // namespace chrome_pdf 144 } // namespace chrome_pdf
145 145
146 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ 146 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698