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

Unified Diff: pdf/pdf_engine.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 and run git cl format 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | pdf/pdfium/pdfium_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdf_engine.h
diff --git a/pdf/pdf_engine.h b/pdf/pdf_engine.h
index c5d33c8706679fa3adcad34f29272e8436bb78d8..31b575d1aebe965d3090ecdbd17b7ebb09b6d4e0 100644
--- a/pdf/pdf_engine.h
+++ b/pdf/pdf_engine.h
@@ -233,6 +233,8 @@ class PDFEngine {
virtual int GetMostVisiblePage() = 0;
// Gets the rectangle of the page including shadow.
virtual pp::Rect GetPageRect(int index) = 0;
+ // Gets the rectangle of the page not including the shadow.
+ virtual pp::Rect GetPageBoundsRect(int index) = 0;
// Gets the rectangle of the page excluding any additional areas.
virtual pp::Rect GetPageContentsRect(int index) = 0;
// Returns a page's rect in screen coordinates, as well as its surrounding
@@ -247,6 +249,20 @@ class PDFEngine {
virtual void OnCallback(int id) = 0;
// Gets the JSON representation of the PDF file
virtual std::string GetPageAsJSON(int index) = 0;
+ // Get the number of characters on a given page.
+ virtual int GetCharCount(int page_index) = 0;
+ // Get the width in pixels of a character on a given page.
+ virtual double GetCharWidth(int page_index, int char_index) = 0;
+ // Get a given unicode character on a given page.
+ virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0;
+ // 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.
+ virtual void GetTextRunInfo(int page_index,
+ int start_char_index,
+ uint32_t* out_len,
+ double* out_font_size,
+ pp::FloatRect* out_bounds) = 0;
// Gets the PDF document's print scaling preference. True if the document can
// be scaled to fit.
virtual bool GetPrintScaling() = 0;
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | pdf/pdfium/pdfium_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698