| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |