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

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 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 side-by-side diff with in-line comments
Download patch
« ppapi/proxy/ppp_pdf_proxy.h ('K') | « 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..c3f6099b09c0b7c52a6f07b8d868465371f48090 100644
--- a/ppapi/thunk/ppb_pdf_thunk.cc
+++ b/ppapi/thunk/ppb_pdf_thunk.cc
@@ -131,6 +131,47 @@ 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,
+ uint32_t page_index,
+ PP_PrivateAccessibilityPageInfo* page_info) {
+ EnterInstanceAPI<PPB_PDF_API> enter(instance);
+ if (enter.failed())
+ return;
+ enter.functions()->SetAccessibilityPageInfo(page_index, page_info);
+}
+
+void SetAccessibilityTextRunInfo(
+ PP_Instance instance,
+ uint32_t page_index,
+ uint32_t text_run_index,
+ PP_PrivateAccessibilityTextRunInfo* text_run_info,
+ PP_PrivateAccessibilityCharInfo chars[]) {
+ EnterInstanceAPI<PPB_PDF_API> enter(instance);
+ if (enter.failed())
+ return;
+ enter.functions()->SetAccessibilityTextRunInfo(
+ page_index, text_run_index, text_run_info, chars);
+}
+
const PPB_PDF g_ppb_pdf_thunk = {
&GetFontFileWithFallback,
&GetFontTableForPrivateFontFile,
@@ -146,6 +187,10 @@ const PPB_PDF g_ppb_pdf_thunk = {
&SetSelectedText,
&SetLinkUnderCursor,
&GetV8ExternalSnapshotData,
+ &SetAccessibilityViewportInfo,
+ &SetAccessibilityDocInfo,
+ &SetAccessibilityPageInfo,
+ &SetAccessibilityTextRunInfo
};
} // namespace
« ppapi/proxy/ppp_pdf_proxy.h ('K') | « ppapi/thunk/ppb_pdf_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698