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

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

Issue 1953053002: Add private PPAPI interfaces for PDFium accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from Lei Created 4 years, 7 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
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 28 matching lines...) Expand all
39 FPDF_PAGE GetPrintPage(); 39 FPDF_PAGE GetPrintPage();
40 // Close the printing page. 40 // Close the printing page.
41 void ClosePrintPage(); 41 void ClosePrintPage();
42 42
43 // Returns FPDF_TEXTPAGE for the page, loading and parsing it if necessary. 43 // Returns FPDF_TEXTPAGE for the page, loading and parsing it if necessary.
44 FPDF_TEXTPAGE GetTextPage(); 44 FPDF_TEXTPAGE GetTextPage();
45 45
46 // Returns a DictionaryValue version of the page. 46 // Returns a DictionaryValue version of the page.
47 base::Value* GetAccessibleContentAsValue(int rotation); 47 base::Value* GetAccessibleContentAsValue(int rotation);
48 48
49 // Given a start char index, find the longest continuous run of text that's
50 // in a single direction and with the same style and font size. Return the
51 // length of that sequence and its font size and bounding box.
52 void GetTextRunInfo(int start_char_index,
53 uint32_t* out_len,
54 double* out_font_size,
55 pp::FloatRect* out_bounds);
56 // Get the width of a character in page pixels.
57 double GetCharWidth(int char_index);
58
49 enum Area { 59 enum Area {
50 NONSELECTABLE_AREA, 60 NONSELECTABLE_AREA,
51 TEXT_AREA, 61 TEXT_AREA,
52 WEBLINK_AREA, // Area is a hyperlink. 62 WEBLINK_AREA, // Area is a hyperlink.
53 DOCLINK_AREA, // Area is a link to a different part of the same document. 63 DOCLINK_AREA, // Area is a link to a different part of the same document.
54 }; 64 };
55 65
56 struct LinkTarget { 66 struct LinkTarget {
57 // We are using std::string here which have a copy contructor. 67 // We are using std::string here which have a copy contructor.
58 // That prevents us from using union here. 68 // That prevents us from using union here.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int loading_count_; 142 int loading_count_;
133 pp::Rect rect_; 143 pp::Rect rect_;
134 bool calculated_links_; 144 bool calculated_links_;
135 std::vector<Link> links_; 145 std::vector<Link> links_;
136 bool available_; 146 bool available_;
137 }; 147 };
138 148
139 } // namespace chrome_pdf 149 } // namespace chrome_pdf
140 150
141 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ 151 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698