Chromium Code Reviews| 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..f7dc3b469c2a04e89e37e3ada7ae68bd2213b8f2 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,44 @@ 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 { |
| + struct PP_Rect bounds; |
| + 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; |
| +}; |
| + |
| struct PPB_PDF { |
| // Returns a resource identifying a font file corresponding to the given font |
| // request after applying the browser-specific fallback. |
| @@ -95,6 +135,32 @@ 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, |
| + uint32_t page_index, |
|
raymes
2016/05/17 20:38:40
nit: could this go in PP_PrivateAccessibilityPageI
dmazzoni
2016/05/26 21:59:13
Done.
|
| + struct PP_PrivateAccessibilityPageInfo* page_info); |
|
raymes
2016/05/17 20:38:40
I wonder if it's good enough to put all the text r
dmazzoni
2016/05/17 20:56:58
Actually it just wasn't clear to me how to do this
raymes
2016/05/17 21:58:13
Ah right. Yeah it is a bit of a headache, I agree.
dmazzoni
2016/05/26 21:59:13
Done.
|
| + |
| + void (*SetAccessibilityTextRunInfo)( |
|
raymes
2016/05/17 20:38:40
nit: no comment
|
| + PP_Instance instance, |
| + uint32_t page_index, |
| + uint32_t text_run_index, |
| + struct PP_PrivateAccessibilityTextRunInfo* text_run_info, |
| + struct PP_PrivateAccessibilityCharInfo chars[]); |
|
raymes
2016/05/17 20:38:40
nit: could everything go in PP_PrivateAccessibilit
dmazzoni
2016/05/17 20:56:58
Same - if this was C++ that's what I'd do.
|
| }; |
| #endif // PPAPI_C_PRIVATE_PPB_PDF_H_ |