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

Unified Diff: pdf/pdfium/pdfium_engine.cc

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/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 5ee7e623ac43e20b3098cb3097ff2bec45443f99..b020fe5062e24fa5f393403e90ac23980c48cd26 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -2270,6 +2270,10 @@ pp::Rect PDFiumEngine::GetPageRect(int index) {
return rc;
}
+pp::Rect PDFiumEngine::GetPageBoundsRect(int index) {
+ return pages_[index]->rect();
+}
+
pp::Rect PDFiumEngine::GetPageContentsRect(int index) {
return GetScreenRect(pages_[index]->rect());
}
@@ -2303,6 +2307,31 @@ std::string PDFiumEngine::GetPageAsJSON(int index) {
return page_json;
}
+int PDFiumEngine::GetCharCount(int page_index) {
+ DCHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size()));
+ return pages_[page_index]->GetCharCount();
+}
+
+double PDFiumEngine::GetCharWidth(int page_index, int char_index) {
+ DCHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size()));
+ return pages_[page_index]->GetCharWidth(char_index);
+}
+
+uint32_t PDFiumEngine::GetCharUnicode(int page_index, int char_index) {
+ DCHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size()));
+ return pages_[page_index]->GetCharUnicode(char_index);
+}
+
+void PDFiumEngine::GetTextRunInfo(int page_index,
+ int start_char_index,
+ uint32_t* out_len,
+ double* out_font_size,
+ pp::FloatRect* out_bounds) {
+ DCHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size()));
+ return pages_[page_index]->GetTextRunInfo(start_char_index, out_len,
+ out_font_size, out_bounds);
+}
+
bool PDFiumEngine::GetPrintScaling() {
return !!FPDF_VIEWERREF_GetPrintScaling(doc_);
}
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698