OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
7 | 7 |
8 #include "third_party/ppapi/c/pp_module.h" | 8 #include "third_party/ppapi/c/pp_module.h" |
9 #include "third_party/ppapi/c/pp_var.h" | 9 #include "third_party/ppapi/c/pp_var.h" |
10 | 10 |
11 #define PPB_PRIVATE_INTERFACE "PPB_Private;1" | 11 #define PPB_PRIVATE_INTERFACE "PPB_Private;1" |
12 | 12 |
13 typedef enum { | 13 typedef enum { |
14 PP_RESOURCESTRING_PDFGETPASSWORD = 0, | 14 PP_RESOURCESTRING_PDFGETPASSWORD = 0, |
15 } PP_ResourceString; | 15 } PP_ResourceString; |
16 | 16 |
17 typedef enum { | 17 typedef enum { |
| 18 PP_RESOURCEIMAGE_PDF_BUTTON_FTH = 0, |
| 19 PP_RESOURCEIMAGE_PDF_BUTTON_FTH_HOVER = 1, |
| 20 PP_RESOURCEIMAGE_PDF_BUTTON_FTH_PRESSED = 2, |
| 21 PP_RESOURCEIMAGE_PDF_BUTTON_FTW = 3, |
| 22 PP_RESOURCEIMAGE_PDF_BUTTON_FTW_HOVER = 4, |
| 23 PP_RESOURCEIMAGE_PDF_BUTTON_FTW_PRESSED = 5, |
| 24 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN = 6, |
| 25 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN_HOVER = 7, |
| 26 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN_PRESSED = 8, |
| 27 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT = 9, |
| 28 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_HOVER = 10, |
| 29 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_PRESSED = 11, |
| 30 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_0 = 12, |
| 31 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_1 = 13, |
| 32 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_2 = 14, |
| 33 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_3 = 15, |
| 34 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_4 = 16, |
| 35 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_5 = 17, |
| 36 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_6 = 18, |
| 37 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_7 = 19, |
| 38 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_8 = 20, |
| 39 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_9 = 21, |
| 40 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_NUM_BACKGROUND = 22, |
| 41 } PP_ResourceImage; |
| 42 |
| 43 typedef enum { |
18 PP_PRIVATEFONTPITCH_DEFAULT = 0, | 44 PP_PRIVATEFONTPITCH_DEFAULT = 0, |
19 PP_PRIVATEFONTPITCH_FIXED = 1 | 45 PP_PRIVATEFONTPITCH_FIXED = 1 |
20 } PP_PrivateFontPitch; | 46 } PP_PrivateFontPitch; |
21 | 47 |
22 typedef enum { | 48 typedef enum { |
23 PP_PRIVATEFONTFAMILY_DEFAULT = 0, | 49 PP_PRIVATEFONTFAMILY_DEFAULT = 0, |
24 PP_PRIVATEFONTFAMILY_ROMAN = 1, | 50 PP_PRIVATEFONTFAMILY_ROMAN = 1, |
25 PP_PRIVATEFONTFAMILY_SCRIPT = 2 | 51 PP_PRIVATEFONTFAMILY_SCRIPT = 2 |
26 } PP_PrivateFontFamily; | 52 } PP_PrivateFontFamily; |
27 | 53 |
(...skipping 25 matching lines...) Expand all Loading... |
53 bool italic; | 79 bool italic; |
54 PP_PrivateFontPitch pitch; | 80 PP_PrivateFontPitch pitch; |
55 PP_PrivateFontFamily family; | 81 PP_PrivateFontFamily family; |
56 PP_PrivateFontCharset charset; | 82 PP_PrivateFontCharset charset; |
57 }; | 83 }; |
58 | 84 |
59 struct PPB_Private { | 85 struct PPB_Private { |
60 // Returns a localized string. | 86 // Returns a localized string. |
61 PP_Var (*GetLocalizedString)(PP_ResourceString string_id); | 87 PP_Var (*GetLocalizedString)(PP_ResourceString string_id); |
62 | 88 |
| 89 // Returns a resource image. |
| 90 PP_Resource (*GetResourceImage)(PP_Module module, |
| 91 PP_ResourceImage image_id); |
| 92 |
63 // Returns a resource identifying a font file corresponding to the given font | 93 // Returns a resource identifying a font file corresponding to the given font |
64 // request after applying the browser-specific fallback. Linux only. | 94 // request after applying the browser-specific fallback. Linux only. |
65 PP_Resource (*GetFontFileWithFallback)( | 95 PP_Resource (*GetFontFileWithFallback)( |
66 PP_Module module, | 96 PP_Module module, |
67 const PP_PrivateFontFileDescription* description); | 97 const PP_PrivateFontFileDescription* description); |
68 | 98 |
69 // Given a resource previously returned by GetFontFileWithFallback, returns | 99 // Given a resource previously returned by GetFontFileWithFallback, returns |
70 // a pointer to the requested font table. Linux only. | 100 // a pointer to the requested font table. Linux only. |
71 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, | 101 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, |
72 uint32_t table, | 102 uint32_t table, |
73 void* output, | 103 void* output, |
74 uint32_t* output_length); | 104 uint32_t* output_length); |
75 }; | 105 }; |
76 | 106 |
77 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 107 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
OLD | NEW |