Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: webkit/plugins/ppapi/ppb_pdf.h

Issue 6255001: Move webkit/plugins/ppapi/ppb_pdf.h to ppapi/c/private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_pdf_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
7
8 #include "ppapi/c/dev/ppb_font_dev.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_module.h"
11 #include "ppapi/c/pp_resource.h"
12 #include "ppapi/c/pp_var.h"
13
14 #define PPB_PDF_INTERFACE "PPB_PDF;1"
15
16 // From the public PPB_Font_Dev file.
17 struct PP_FontDescription_Dev;
18
19 typedef enum {
20 PP_RESOURCESTRING_PDFGETPASSWORD = 0,
21 PP_RESOURCESTRING_PDFLOADING = 1,
22 PP_RESOURCESTRING_PDFLOAD_FAILED = 2,
23 } PP_ResourceString;
24
25 typedef enum {
26 PP_RESOURCEIMAGE_PDF_BUTTON_FTH = 0,
27 PP_RESOURCEIMAGE_PDF_BUTTON_FTH_HOVER = 1,
28 PP_RESOURCEIMAGE_PDF_BUTTON_FTH_PRESSED = 2,
29 PP_RESOURCEIMAGE_PDF_BUTTON_FTW = 3,
30 PP_RESOURCEIMAGE_PDF_BUTTON_FTW_HOVER = 4,
31 PP_RESOURCEIMAGE_PDF_BUTTON_FTW_PRESSED = 5,
32 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN = 6,
33 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN_HOVER = 7,
34 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMIN_PRESSED = 8,
35 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT = 9,
36 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_HOVER = 10,
37 PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_PRESSED = 11,
38 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_0 = 12,
39 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_1 = 13,
40 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_2 = 14,
41 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_3 = 15,
42 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_4 = 16,
43 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_5 = 17,
44 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_6 = 18,
45 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_7 = 19,
46 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_8 = 20,
47 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_9 = 21,
48 PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_NUM_BACKGROUND = 22,
49 } PP_ResourceImage;
50
51 typedef enum {
52 PP_PRIVATEFONTCHARSET_ANSI = 0,
53 PP_PRIVATEFONTCHARSET_DEFAULT = 1,
54 PP_PRIVATEFONTCHARSET_SYMBOL = 2,
55 PP_PRIVATEFONTCHARSET_MAC = 77,
56 PP_PRIVATEFONTCHARSET_SHIFTJIS = 128,
57 PP_PRIVATEFONTCHARSET_HANGUL = 129,
58 PP_PRIVATEFONTCHARSET_JOHAB = 130,
59 PP_PRIVATEFONTCHARSET_GB2312 =134,
60 PP_PRIVATEFONTCHARSET_CHINESEBIG5 = 136,
61 PP_PRIVATEFONTCHARSET_GREEK = 161,
62 PP_PRIVATEFONTCHARSET_TURKISH = 162,
63 PP_PRIVATEFONTCHARSET_VIETNAMESE = 163,
64 PP_PRIVATEFONTCHARSET_HEBREW = 177,
65 PP_PRIVATEFONTCHARSET_ARABIC = 178,
66 PP_PRIVATEFONTCHARSET_BALTIC = 186,
67 PP_PRIVATEFONTCHARSET_RUSSIAN = 204,
68 PP_PRIVATEFONTCHARSET_THAI = 222,
69 PP_PRIVATEFONTCHARSET_EASTEUROPE = 238,
70 PP_PRIVATEFONTCHARSET_OEM = 255
71 } PP_PrivateFontCharset;
72
73 struct PP_PrivateFontFileDescription {
74 const char* face;
75 uint32_t weight;
76 bool italic;
77 };
78
79 struct PP_PrivateFindResult {
80 int start_index;
81 int length;
82 };
83
84 struct PPB_PDF {
85 // Returns a localized string.
86 PP_Var (*GetLocalizedString)(PP_Module module, PP_ResourceString string_id);
87
88 // Returns a resource image.
89 PP_Resource (*GetResourceImage)(PP_Module module,
90 PP_ResourceImage image_id);
91
92 // Returns a resource identifying a font file corresponding to the given font
93 // request after applying the browser-specific fallback.
94 //
95 // Currently Linux-only.
96 PP_Resource (*GetFontFileWithFallback)(
97 PP_Module module,
98 const PP_FontDescription_Dev* description,
99 PP_PrivateFontCharset charset);
100
101 // Given a resource previously returned by GetFontFileWithFallback, returns
102 // a pointer to the requested font table. Linux only.
103 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file,
104 uint32_t table,
105 void* output,
106 uint32_t* output_length);
107
108 // Search the given string using ICU. Use PPB_Core's MemFree on results when
109 // done.
110 void (*SearchString)(
111 PP_Module module,
112 const unsigned short* string,
113 const unsigned short* term,
114 bool case_sensitive,
115 PP_PrivateFindResult** results,
116 int* count);
117
118 // Since WebFrame doesn't know about PPAPI requests, it'll think the page has
119 // finished loading even if there are outstanding requests by the plugin.
120 // Take this out once WebFrame knows about requests by PPAPI plugins.
121 void (*DidStartLoading)(PP_Instance instance);
122 void (*DidStopLoading)(PP_Instance instance);
123
124 // Sets content restriction for a full-page plugin (i.e. can't copy/print).
125 // The value is a bitfield of ContentRestriction enums.
126 void (*SetContentRestriction)(PP_Instance instance, int restrictions);
127
128 // Use UMA so we know average pdf page count.
129 void (*HistogramPDFPageCount)(int count);
130
131 // Notifies the browser that the given action has been performed.
132 void (*UserMetricsRecordAction)(PP_Var action);
133 };
134
135 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698