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

Side by Side Diff: ppapi/cpp/private/pdf.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ppapi/cpp/private/pdf.h" 5 #include "ppapi/cpp/private/pdf.h"
6 6
7 #include "ppapi/c/trusted/ppb_browser_font_trusted.h" 7 #include "ppapi/c/trusted/ppb_browser_font_trusted.h"
8 #include "ppapi/cpp/image_data.h" 8 #include "ppapi/cpp/image_data.h"
9 #include "ppapi/cpp/instance_handle.h" 9 #include "ppapi/cpp/instance_handle.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 natives_data_out, natives_size_out, snapshot_data_out, 145 natives_data_out, natives_size_out, snapshot_data_out,
146 snapshot_size_out); 146 snapshot_size_out);
147 return; 147 return;
148 } 148 }
149 *natives_data_out = NULL; 149 *natives_data_out = NULL;
150 *snapshot_data_out = NULL; 150 *snapshot_data_out = NULL;
151 *natives_size_out = 0; 151 *natives_size_out = 0;
152 *snapshot_size_out = 0; 152 *snapshot_size_out = 0;
153 } 153 }
154 154
155 // static
156 void PDF::SetAccessibilityViewportInfo(
157 const InstanceHandle& instance,
158 PP_PrivateAccessibilityViewportInfo* viewport_info) {
159 if (has_interface<PPB_PDF>()) {
160 get_interface<PPB_PDF>()->SetAccessibilityViewportInfo(
161 instance.pp_instance(),
162 viewport_info);
163 }
164 }
165
166 // static
167 void PDF::SetAccessibilityDocInfo(
168 const InstanceHandle& instance,
169 PP_PrivateAccessibilityDocInfo* doc_info) {
170 if (has_interface<PPB_PDF>()) {
171 get_interface<PPB_PDF>()->SetAccessibilityDocInfo(
172 instance.pp_instance(),
173 doc_info);
174 }
175 }
176
177 // static
178 void PDF::SetAccessibilityPageInfo(
179 const InstanceHandle& instance,
180 uint32_t page_index,
181 PP_PrivateAccessibilityPageInfo* page_info) {
182 if (has_interface<PPB_PDF>()) {
183 get_interface<PPB_PDF>()->SetAccessibilityPageInfo(
184 instance.pp_instance(),
185 page_index,
186 page_info);
187 }
188 }
189
190 // static
191 void PDF::SetAccessibilityTextRunInfo(
192 const InstanceHandle& instance,
193 uint32_t page_index,
194 uint32_t text_run_index,
195 PP_PrivateAccessibilityTextRunInfo* text_run_info,
196 PP_PrivateAccessibilityCharInfo chars[]) {
197 if (has_interface<PPB_PDF>()) {
198 get_interface<PPB_PDF>()->SetAccessibilityTextRunInfo(
199 instance.pp_instance(),
200 page_index,
201 text_run_index,
202 text_run_info,
203 chars);
204 }
205 }
206
155 } // namespace pp 207 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698