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

Side by Side Diff: components/pdf/renderer/pepper_pdf_host.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, 6 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 unified diff | Download patch
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.h ('k') | pdf/out_of_process_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/pdf/renderer/pepper_pdf_host.h" 5 #include "components/pdf/renderer/pepper_pdf_host.h"
6 6
7 #include "components/pdf/common/pdf_messages.h" 7 #include "components/pdf/common/pdf_messages.h"
8 #include "content/public/common/referrer.h" 8 #include "content/public/common/referrer.h"
9 #include "content/public/renderer/pepper_plugin_instance.h" 9 #include "content/public/renderer/pepper_plugin_instance.h"
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 OnHostMsgHasUnsupportedFeature) 72 OnHostMsgHasUnsupportedFeature)
73 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_Print, OnHostMsgPrint) 73 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_Print, OnHostMsgPrint)
74 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_SaveAs, 74 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_SaveAs,
75 OnHostMsgSaveAs) 75 OnHostMsgSaveAs)
76 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetSelectedText, 76 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetSelectedText,
77 OnHostMsgSetSelectedText) 77 OnHostMsgSetSelectedText)
78 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetLinkUnderCursor, 78 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetLinkUnderCursor,
79 OnHostMsgSetLinkUnderCursor) 79 OnHostMsgSetLinkUnderCursor)
80 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetContentRestriction, 80 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetContentRestriction,
81 OnHostMsgSetContentRestriction) 81 OnHostMsgSetContentRestriction)
82 PPAPI_DISPATCH_HOST_RESOURCE_CALL(
83 PpapiHostMsg_PDF_SetAccessibilityViewportInfo,
84 OnHostMsgSetAccessibilityViewportInfo)
85 PPAPI_DISPATCH_HOST_RESOURCE_CALL(
86 PpapiHostMsg_PDF_SetAccessibilityDocInfo,
87 OnHostMsgSetAccessibilityDocInfo)
88 PPAPI_DISPATCH_HOST_RESOURCE_CALL(
89 PpapiHostMsg_PDF_SetAccessibilityPageInfo,
90 OnHostMsgSetAccessibilityPageInfo)
82 PPAPI_END_MESSAGE_MAP() 91 PPAPI_END_MESSAGE_MAP()
83 return PP_ERROR_FAILED; 92 return PP_ERROR_FAILED;
84 } 93 }
85 94
86 int32_t PepperPDFHost::OnHostMsgDidStartLoading( 95 int32_t PepperPDFHost::OnHostMsgDidStartLoading(
87 ppapi::host::HostMessageContext* context) { 96 ppapi::host::HostMessageContext* context) {
88 content::PepperPluginInstance* instance = 97 content::PepperPluginInstance* instance =
89 host_->GetPluginInstance(pp_instance()); 98 host_->GetPluginInstance(pp_instance());
90 if (!instance) 99 if (!instance)
91 return PP_ERROR_FAILED; 100 return PP_ERROR_FAILED;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ppapi::host::HostMessageContext* context, 185 ppapi::host::HostMessageContext* context,
177 const std::string& url) { 186 const std::string& url) {
178 content::PepperPluginInstance* instance = 187 content::PepperPluginInstance* instance =
179 host_->GetPluginInstance(pp_instance()); 188 host_->GetPluginInstance(pp_instance());
180 if (!instance) 189 if (!instance)
181 return PP_ERROR_FAILED; 190 return PP_ERROR_FAILED;
182 instance->SetLinkUnderCursor(url); 191 instance->SetLinkUnderCursor(url);
183 return PP_OK; 192 return PP_OK;
184 } 193 }
185 194
195 int32_t PepperPDFHost::OnHostMsgSetAccessibilityViewportInfo(
196 ppapi::host::HostMessageContext* context,
197 const PP_PrivateAccessibilityViewportInfo& viewport_info) {
198 return PP_OK;
199 }
200
201 int32_t PepperPDFHost::OnHostMsgSetAccessibilityDocInfo(
202 ppapi::host::HostMessageContext* context,
203 const PP_PrivateAccessibilityDocInfo& doc_info) {
204 return PP_OK;
205 }
206
207 int32_t PepperPDFHost::OnHostMsgSetAccessibilityPageInfo(
208 ppapi::host::HostMessageContext* context,
209 const PP_PrivateAccessibilityPageInfo& page_info,
210 const std::vector<PP_PrivateAccessibilityTextRunInfo>& text_run_info,
211 const std::vector<PP_PrivateAccessibilityCharInfo>& chars) {
212 return PP_OK;
213 }
214
186 } // namespace pdf 215 } // namespace pdf
OLDNEW
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.h ('k') | pdf/out_of_process_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698