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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // empty vector otherwise. | 112 // empty vector otherwise. |
113 std::vector<int> GetLinks(pp::Rect text_area, | 113 std::vector<int> GetLinks(pp::Rect text_area, |
114 std::vector<LinkTarget>* targets); | 114 std::vector<LinkTarget>* targets); |
115 // Calculate the locations of any links on the page. | 115 // Calculate the locations of any links on the page. |
116 void CalculateLinks(); | 116 void CalculateLinks(); |
117 // Returns link type and target associated with a link. Returns | 117 // Returns link type and target associated with a link. Returns |
118 // NONSELECTABLE_AREA if link detection failed. | 118 // NONSELECTABLE_AREA if link detection failed. |
119 Area GetLinkTarget(FPDF_LINK link, LinkTarget* target) const; | 119 Area GetLinkTarget(FPDF_LINK link, LinkTarget* target) const; |
120 // Returns target associated with a destination. | 120 // Returns target associated with a destination. |
121 Area GetDestinationTarget(FPDF_DEST destination, LinkTarget* target) const; | 121 Area GetDestinationTarget(FPDF_DEST destination, LinkTarget* target) const; |
| 122 // Returns target associated with a URI action. |
| 123 Area GetURITarget(FPDF_ACTION uri_action, LinkTarget* target) const; |
122 | 124 |
123 class ScopedLoadCounter { | 125 class ScopedLoadCounter { |
124 public: | 126 public: |
125 explicit ScopedLoadCounter(PDFiumPage* page); | 127 explicit ScopedLoadCounter(PDFiumPage* page); |
126 ~ScopedLoadCounter(); | 128 ~ScopedLoadCounter(); |
127 | 129 |
128 private: | 130 private: |
129 PDFiumPage* const page_; | 131 PDFiumPage* const page_; |
130 }; | 132 }; |
131 | 133 |
(...skipping 14 matching lines...) Expand all Loading... |
146 int loading_count_; | 148 int loading_count_; |
147 pp::Rect rect_; | 149 pp::Rect rect_; |
148 bool calculated_links_; | 150 bool calculated_links_; |
149 std::vector<Link> links_; | 151 std::vector<Link> links_; |
150 bool available_; | 152 bool available_; |
151 }; | 153 }; |
152 | 154 |
153 } // namespace chrome_pdf | 155 } // namespace chrome_pdf |
154 | 156 |
155 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ | 157 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ |
OLD | NEW |