diff options
Diffstat (limited to 'chromium/ppapi/proxy/pdf_resource.cc')
-rw-r--r-- | chromium/ppapi/proxy/pdf_resource.cc | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/chromium/ppapi/proxy/pdf_resource.cc b/chromium/ppapi/proxy/pdf_resource.cc index 48addd20cb5..de83fb6c1e0 100644 --- a/chromium/ppapi/proxy/pdf_resource.cc +++ b/chromium/ppapi/proxy/pdf_resource.cc @@ -226,32 +226,7 @@ void PDFResource::SetAccessibilityPageInfo( text_run_vector.reserve(page_info->text_run_count); for (size_t i = 0; i < page_info->text_run_count; i++) text_run_vector.emplace_back(text_runs[i]); - std::vector<ppapi::PdfAccessibilityLinkInfo> link_vector; - link_vector.reserve(page_objects->link_count); - for (size_t i = 0; i < page_objects->link_count; i++) { - link_vector.emplace_back(page_objects->links[i]); - } - std::vector<ppapi::PdfAccessibilityImageInfo> image_vector; - image_vector.reserve(page_objects->image_count); - for (size_t i = 0; i < page_objects->image_count; i++) { - image_vector.emplace_back(page_objects->images[i]); - } - std::vector<ppapi::PdfAccessibilityHighlightInfo> highlight_vector; - highlight_vector.reserve(page_objects->highlight_count); - for (size_t i = 0; i < page_objects->highlight_count; i++) { - highlight_vector.emplace_back(page_objects->highlights[i]); - } - std::vector<ppapi::PdfAccessibilityTextFieldInfo> text_field_vector; - text_field_vector.reserve(page_objects->text_field_count); - for (size_t i = 0; i < page_objects->text_field_count; i++) { - text_field_vector.emplace_back(page_objects->text_fields[i]); - } - - ppapi::PdfAccessibilityPageObjects ppapi_page_objects; - ppapi_page_objects.links = std::move(link_vector); - ppapi_page_objects.images = std::move(image_vector); - ppapi_page_objects.highlights = std::move(highlight_vector); - ppapi_page_objects.text_fields = std::move(text_field_vector); + ppapi::PdfAccessibilityPageObjects ppapi_page_objects(*page_objects); Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityPageInfo( |