Add private PPAPI interfaces for PDFium accessibility.
This change adds PPAPI interfaces for PDFium accessibility and
implements them in the PDFium engine wrapper code. The approach
to get the accessible text is similar to the existing JSON
interface, which will be deleted once this approach is finished.
Design doc (shared with chromium.org): https://goo.gl/ZJUBsg
BUG=54724
Review-Url: https://codereview.chromium.org/1953053002
Cr-Commit-Position: refs/heads/master@{#397298}
diff --git a/pdf/pdfium/pdfium_page.h b/pdf/pdfium/pdfium_page.h
index 802ecb6..64f3ebc 100644
--- a/pdf/pdfium/pdfium_page.h
+++ b/pdf/pdfium/pdfium_page.h
@@ -46,6 +46,18 @@
// Returns a DictionaryValue version of the page.
base::Value* GetAccessibleContentAsValue(int rotation);
+ // Given a start char index, find the longest continuous run of text that's
+ // in a single direction and with the same style and font size. Return the
+ // length of that sequence and its font size and bounding box.
+ void GetTextRunInfo(int start_char_index,
+ uint32_t* out_len,
+ double* out_font_size,
+ pp::FloatRect* out_bounds);
+ // Get a unicode character from the page.
+ uint32_t GetCharUnicode(int char_index);
+ // Get the width of a character in page pixels.
+ double GetCharWidth(int char_index);
+
enum Area {
NONSELECTABLE_AREA,
TEXT_AREA,