Index: ppapi/c/private/ppb_pdf.h |
diff --git a/ppapi/c/private/ppb_pdf.h b/ppapi/c/private/ppb_pdf.h |
index a4c49c3e114315d46e9319bbc11a2c6aae3a68c6..ce6221e07aaf5b30d6126674e06a2cbd87e50a19 100644 |
--- a/ppapi/c/private/ppb_pdf.h |
+++ b/ppapi/c/private/ppb_pdf.h |
@@ -9,6 +9,8 @@ |
#include "ppapi/c/pp_bool.h" |
#include "ppapi/c/pp_instance.h" |
+#include "ppapi/c/pp_point.h" |
+#include "ppapi/c/pp_rect.h" |
#include "ppapi/c/pp_resource.h" |
#include "ppapi/c/pp_var.h" |
#include "ppapi/c/private/pp_private_font_charset.h" |
@@ -31,6 +33,46 @@ struct PP_PrivateFindResult { |
int length; |
}; |
+struct PP_PrivateAccessibilityViewportInfo { |
+ double zoom; |
+ struct PP_Point scroll; |
+ struct PP_Point offset; |
+}; |
+ |
+struct PP_PrivateAccessibilityDocInfo { |
+ uint32_t page_count; |
+ PP_Bool text_accessible; |
+ PP_Bool text_copyable; |
+}; |
+ |
+typedef enum { |
+ PP_PRIVATEDIRECTION_NONE = 0, |
+ PP_PRIVATEDIRECTION_LTR = 1, |
+ PP_PRIVATEDIRECTION_RTL = 2, |
+ PP_PRIVATEDIRECTION_TTB = 3, |
+ PP_PRIVATEDIRECTION_BTT = 4, |
+ PP_PRIVATEDIRECTION_LAST = PP_PRIVATEDIRECTION_BTT |
+} PP_PrivateDirection; |
+ |
+struct PP_PrivateAccessibilityPageInfo { |
+ uint32_t page_index; |
+ struct PP_Rect bounds; |
+ uint32_t text_run_count; |
+ uint32_t char_count; |
+}; |
+ |
+struct PP_PrivateAccessibilityTextRunInfo { |
+ uint32_t len; |
+ double font_size; |
+ struct PP_FloatRect bounds; |
+ PP_PrivateDirection direction; |
+}; |
+ |
+struct PP_PrivateAccessibilityCharInfo { |
+ uint32_t unicode_character; |
+ double char_width; |
raymes
2016/05/30 04:17:37
Would it be any more performant to split these two
dmazzoni
2016/05/31 21:45:01
I agree there are some advantages to having parall
raymes
2016/06/01 00:05:53
sgtm
|
+}; |
+ |
struct PPB_PDF { |
// Returns a resource identifying a font file corresponding to the given font |
// request after applying the browser-specific fallback. |
@@ -95,6 +137,27 @@ struct PPB_PDF { |
int* natives_size_out, |
const char** snapshot_data_out, |
int* snapshot_size_out); |
+ |
+ // Sends information about the viewport to the renderer for accessibility |
+ // support. |
+ void (*SetAccessibilityViewportInfo)( |
+ PP_Instance instance, |
+ struct PP_PrivateAccessibilityViewportInfo* viewport_info); |
+ |
+ // Sends information about the PDF document to the renderer for accessibility |
+ // support. |
+ void (*SetAccessibilityDocInfo)( |
+ PP_Instance instance, |
+ struct PP_PrivateAccessibilityDocInfo* doc_info); |
+ |
+ // Sends information about one page in a PDF document to the renderer for |
+ // accessibility support. |
+ void (*SetAccessibilityPageInfo)( |
+ PP_Instance instance, |
+ struct PP_PrivateAccessibilityPageInfo* page_info, |
+ struct PP_PrivateAccessibilityTextRunInfo text_runs[], |
+ struct PP_PrivateAccessibilityCharInfo chars[]); |
+ |
}; |
#endif // PPAPI_C_PRIVATE_PPB_PDF_H_ |