Upload upstream chromium 76.0.3809.146
[platform/framework/web/chromium-efl.git] / pdf / accessibility.h
1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PDF_ACCESSIBILITY_H_
6 #define PDF_ACCESSIBILITY_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 struct PP_PrivateAccessibilityCharInfo;
13 struct PP_PrivateAccessibilityPageInfo;
14 struct PP_PrivateAccessibilityTextRunInfo;
15
16 namespace chrome_pdf {
17
18 class PDFEngine;
19
20 // Retrieve |page_info|, |text_runs|, and |chars| from |engine| for the page at
21 // 0-indexed |page_index|. Returns true on success with all out parameters
22 // filled, or false on failure with all out parameters untouched.
23 bool GetAccessibilityInfo(
24     PDFEngine* engine,
25     int32_t page_index,
26     PP_PrivateAccessibilityPageInfo* page_info,
27     std::vector<PP_PrivateAccessibilityTextRunInfo>* text_runs,
28     std::vector<PP_PrivateAccessibilityCharInfo>* chars);
29
30 }  // namespace chrome_pdf
31
32 #endif  // PDF_ACCESSIBILITY_H_