OLD | NEW |
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 Loading... |
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 |
OLD | NEW |