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

Side by Side Diff: ppapi/proxy/pdf_resource.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 | « ppapi/proxy/pdf_resource.h ('k') | ppapi/proxy/ppapi_messages.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 (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/proxy/pdf_resource.h" 5 #include "ppapi/proxy/pdf_resource.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 void PDFResource::GetV8ExternalSnapshotData(const char** natives_data_out, 163 void PDFResource::GetV8ExternalSnapshotData(const char** natives_data_out,
164 int* natives_size_out, 164 int* natives_size_out,
165 const char** snapshot_data_out, 165 const char** snapshot_data_out,
166 int* snapshot_size_out) { 166 int* snapshot_size_out) {
167 gin::V8Initializer::GetV8ExternalSnapshotData( 167 gin::V8Initializer::GetV8ExternalSnapshotData(
168 natives_data_out, natives_size_out, snapshot_data_out, snapshot_size_out); 168 natives_data_out, natives_size_out, snapshot_data_out, snapshot_size_out);
169 } 169 }
170 170
171 void PDFResource::SetAccessibilityDocInfo(
172 PP_PrivateAccessibilityDocInfo* doc_info) {
173 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityDocInfo(*doc_info));
174 }
175
176 void PDFResource::SetAccessibilityViewportInfo(
177 PP_PrivateAccessibilityViewportInfo* viewport_info) {
178 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityViewportInfo(*viewport_info));
179 }
180
181 void PDFResource::SetAccessibilityPageInfo(
182 PP_PrivateAccessibilityPageInfo* page_info,
183 PP_PrivateAccessibilityTextRunInfo text_runs[],
184 PP_PrivateAccessibilityCharInfo chars[]) {
185 std::vector<PP_PrivateAccessibilityTextRunInfo> text_run_vector(
186 text_runs, text_runs + page_info->text_run_count);
187 std::vector<PP_PrivateAccessibilityCharInfo> char_vector(
188 chars, chars + page_info->char_count);
189 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityPageInfo(
190 *page_info, text_run_vector, char_vector));
191 }
192
171 } // namespace proxy 193 } // namespace proxy
172 } // namespace ppapi 194 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/pdf_resource.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698