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

Unified Diff: ppapi/thunk/ppb_pdf_thunk.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 | « ppapi/thunk/ppb_pdf_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_pdf_thunk.cc
diff --git a/ppapi/thunk/ppb_pdf_thunk.cc b/ppapi/thunk/ppb_pdf_thunk.cc
index 4966bd4dd6947c90ec346a94418a0b36810a2747..fbf154a5dc5ccb78aa19266418b53c25c2ade63a 100644
--- a/ppapi/thunk/ppb_pdf_thunk.cc
+++ b/ppapi/thunk/ppb_pdf_thunk.cc
@@ -131,6 +131,35 @@ void GetV8ExternalSnapshotData(PP_Instance instance,
natives_size_out, snapshot_data_out, snapshot_size_out);
}
+void SetAccessibilityViewportInfo(
+ PP_Instance instance,
+ PP_PrivateAccessibilityViewportInfo* viewport_info) {
+ EnterInstanceAPI<PPB_PDF_API> enter(instance);
+ if (enter.failed())
+ return;
+ enter.functions()->SetAccessibilityViewportInfo(viewport_info);
+}
+
+void SetAccessibilityDocInfo(
+ PP_Instance instance,
+ PP_PrivateAccessibilityDocInfo* doc_info) {
+ EnterInstanceAPI<PPB_PDF_API> enter(instance);
+ if (enter.failed())
+ return;
+ enter.functions()->SetAccessibilityDocInfo(doc_info);
+}
+
+void SetAccessibilityPageInfo(
+ PP_Instance instance,
+ PP_PrivateAccessibilityPageInfo* page_info,
+ PP_PrivateAccessibilityTextRunInfo text_runs[],
+ PP_PrivateAccessibilityCharInfo chars[]) {
+ EnterInstanceAPI<PPB_PDF_API> enter(instance);
+ if (enter.failed())
+ return;
+ enter.functions()->SetAccessibilityPageInfo(page_info, text_runs, chars);
+}
+
const PPB_PDF g_ppb_pdf_thunk = {
&GetFontFileWithFallback,
&GetFontTableForPrivateFontFile,
@@ -146,6 +175,9 @@ const PPB_PDF g_ppb_pdf_thunk = {
&SetSelectedText,
&SetLinkUnderCursor,
&GetV8ExternalSnapshotData,
+ &SetAccessibilityViewportInfo,
+ &SetAccessibilityDocInfo,
+ &SetAccessibilityPageInfo
};
} // namespace
« no previous file with comments | « ppapi/thunk/ppb_pdf_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698