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

Unified Diff: ppapi/proxy/ppp_pdf_proxy.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 raymes 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
Index: ppapi/proxy/ppp_pdf_proxy.cc
diff --git a/ppapi/proxy/ppp_pdf_proxy.cc b/ppapi/proxy/ppp_pdf_proxy.cc
index cafde231006f7cbe438b4fd707b0758e7542dd31..80cecee47521816d7e687021b8fb14013d1fd07d 100644
--- a/ppapi/proxy/ppp_pdf_proxy.cc
+++ b/ppapi/proxy/ppp_pdf_proxy.cc
@@ -36,10 +36,17 @@ PP_Bool GetPrintPresetOptionsFromDocument(
return ret;
}
+void EnableAccessibility(PP_Instance instance) {
+ HostDispatcher::GetForInstance(instance)
+ ->Send(new PpapiMsg_PPPPdf_EnableAccessibility(
+ API_ID_PPP_PDF, instance));
+}
+
const PPP_Pdf ppp_pdf_interface = {
&GetLinkAtPosition,
&Transform,
- &GetPrintPresetOptionsFromDocument
+ &GetPrintPresetOptionsFromDocument,
+ &EnableAccessibility,
};
#else
// The NaCl plugin doesn't need the host side interface - stub it out.
@@ -74,6 +81,8 @@ bool PPP_Pdf_Proxy::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PpapiMsg_PPPPdf_Rotate, OnPluginMsgRotate)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPPdf_PrintPresetOptions,
OnPluginMsgPrintPresetOptions)
+ IPC_MESSAGE_HANDLER(PpapiMsg_PPPPdf_EnableAccessibility,
+ OnPluginMsgEnableAccessibility)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -97,5 +106,11 @@ void PPP_Pdf_Proxy::OnPluginMsgPrintPresetOptions(
}
}
+void PPP_Pdf_Proxy::OnPluginMsgEnableAccessibility(
+ PP_Instance instance) {
+ if (ppp_pdf_)
+ CallWhileUnlocked(ppp_pdf_->EnableAccessibility, instance);
+}
+
} // namespace proxy
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698