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 uint32_t page_index, |
| 183 PP_PrivateAccessibilityPageInfo* page_info) { |
| 184 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityPageInfo( |
| 185 page_index, *page_info)); |
| 186 } |
| 187 |
| 188 void PDFResource::SetAccessibilityTextRunInfo( |
| 189 uint32_t page_index, |
| 190 uint32_t text_run_index, |
| 191 PP_PrivateAccessibilityTextRunInfo* text_run_info, |
| 192 PP_PrivateAccessibilityCharInfo chars[]) { |
| 193 std::vector<PP_PrivateAccessibilityCharInfo> char_vector; |
| 194 char_vector.resize(text_run_info->len); |
| 195 for (size_t i = 0; i < text_run_info->len; ++i) |
| 196 char_vector[i] = chars[i]; |
| 197 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityTextRunInfo( |
| 198 page_index, text_run_index, *text_run_info, char_vector)); |
| 199 } |
| 200 |
171 } // namespace proxy | 201 } // namespace proxy |
172 } // namespace ppapi | 202 } // namespace ppapi |
OLD | NEW |