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

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 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/proxy/ppp_pdf_proxy.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ef89438eaef36794606c30923db8cc9884a8217f 100644
--- a/ppapi/proxy/ppp_pdf_proxy.cc
+++ b/ppapi/proxy/ppp_pdf_proxy.cc
@@ -36,10 +36,16 @@ 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 +80,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 +105,10 @@ 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
« no previous file with comments | « ppapi/proxy/ppp_pdf_proxy.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698