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

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 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 unified diff | Download patch
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)
91 PPAPI_DISPATCH_HOST_RESOURCE_CALL(
92 PpapiHostMsg_PDF_SetAccessibilityTextRunInfo,
93 OnHostMsgSetAccessibilityTextRunInfo)
82 PPAPI_END_MESSAGE_MAP() 94 PPAPI_END_MESSAGE_MAP()
83 return PP_ERROR_FAILED; 95 return PP_ERROR_FAILED;
84 } 96 }
85 97
86 int32_t PepperPDFHost::OnHostMsgDidStartLoading( 98 int32_t PepperPDFHost::OnHostMsgDidStartLoading(
87 ppapi::host::HostMessageContext* context) { 99 ppapi::host::HostMessageContext* context) {
88 content::PepperPluginInstance* instance = 100 content::PepperPluginInstance* instance =
89 host_->GetPluginInstance(pp_instance()); 101 host_->GetPluginInstance(pp_instance());
90 if (!instance) 102 if (!instance)
91 return PP_ERROR_FAILED; 103 return PP_ERROR_FAILED;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ppapi::host::HostMessageContext* context, 188 ppapi::host::HostMessageContext* context,
177 const std::string& url) { 189 const std::string& url) {
178 content::PepperPluginInstance* instance = 190 content::PepperPluginInstance* instance =
179 host_->GetPluginInstance(pp_instance()); 191 host_->GetPluginInstance(pp_instance());
180 if (!instance) 192 if (!instance)
181 return PP_ERROR_FAILED; 193 return PP_ERROR_FAILED;
182 instance->SetLinkUnderCursor(url); 194 instance->SetLinkUnderCursor(url);
183 return PP_OK; 195 return PP_OK;
184 } 196 }
185 197
198 int32_t PepperPDFHost::OnHostMsgSetAccessibilityViewportInfo(
199 ppapi::host::HostMessageContext* context,
200 const PP_PrivateAccessibilityViewportInfo& viewport_info) {
201 return PP_OK;
202 }
203
204 int32_t PepperPDFHost::OnHostMsgSetAccessibilityDocInfo(
205 ppapi::host::HostMessageContext* context,
206 const PP_PrivateAccessibilityDocInfo& doc_info) {
207 return PP_OK;
208 }
209
210 int32_t PepperPDFHost::OnHostMsgSetAccessibilityPageInfo(
211 ppapi::host::HostMessageContext* context,
212 uint32_t page_index,
213 const PP_PrivateAccessibilityPageInfo& page_info) {
214 return PP_OK;
215 }
216
217 int32_t PepperPDFHost::OnHostMsgSetAccessibilityTextRunInfo(
218 ppapi::host::HostMessageContext* context,
219 uint32_t page_index,
220 uint32_t text_run_index,
221 const PP_PrivateAccessibilityTextRunInfo& text_run_info,
222 const std::vector<PP_PrivateAccessibilityCharInfo>& chars) {
223 return PP_OK;
224 }
225
186 } // namespace pdf 226 } // namespace pdf
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698