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

Side by Side Diff: ppapi/c/private/ppb_pdf.h

Issue 1329213002: PDF: Use chrome.resourcesPrivate instead of Pepper to display translated strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@i18n_api
Patch Set: Remove test cases Created 5 years, 3 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
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | ppapi/cpp/private/pdf.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_C_PRIVATE_PPB_PDF_H_ 5 #ifndef PPAPI_C_PRIVATE_PPB_PDF_H_
6 #define PPAPI_C_PRIVATE_PPB_PDF_H_ 6 #define PPAPI_C_PRIVATE_PPB_PDF_H_
7 7
8 #include "ppapi/c/dev/ppb_font_dev.h" 8 #include "ppapi/c/dev/ppb_font_dev.h"
9 #include "ppapi/c/pp_bool.h" 9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/c/pp_instance.h" 10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/pp_resource.h" 11 #include "ppapi/c/pp_resource.h"
12 #include "ppapi/c/pp_var.h" 12 #include "ppapi/c/pp_var.h"
13 #include "ppapi/c/private/pp_private_font_charset.h" 13 #include "ppapi/c/private/pp_private_font_charset.h"
14 14
15 #define PPB_PDF_INTERFACE "PPB_PDF;1" 15 #define PPB_PDF_INTERFACE "PPB_PDF;1"
16 16
17 // From the public PPB_Font_Dev file. 17 // From the public PPB_Font_Dev file.
18 struct PP_FontDescription_Dev; 18 struct PP_FontDescription_Dev;
19 19
20 typedef enum { 20 typedef enum {
21 PP_RESOURCESTRING_PDFGETPASSWORD = 0,
22 PP_RESOURCESTRING_PDFLOADING = 1,
23 PP_RESOURCESTRING_PDFLOAD_FAILED = 2,
24 PP_RESOURCESTRING_PDFPROGRESSLOADING = 3
25 } PP_ResourceString;
26
27 typedef enum {
28 PP_PDFFEATURE_HIDPI = 0, 21 PP_PDFFEATURE_HIDPI = 0,
29 PP_PDFFEATURE_PRINTING = 1 22 PP_PDFFEATURE_PRINTING = 1
30 } PP_PDFFeature; 23 } PP_PDFFeature;
31 24
32 struct PP_PrivateFontFileDescription { 25 struct PP_PrivateFontFileDescription {
33 const char* face; 26 const char* face;
34 uint32_t weight; 27 uint32_t weight;
35 bool italic; 28 bool italic;
36 }; 29 };
37 30
38 struct PP_PrivateFindResult { 31 struct PP_PrivateFindResult {
39 int start_index; 32 int start_index;
40 int length; 33 int length;
41 }; 34 };
42 35
43 struct PPB_PDF { 36 struct PPB_PDF {
44 // Returns a localized string.
45 struct PP_Var (*GetLocalizedString)(PP_Instance instance,
46 PP_ResourceString string_id);
47
48 // Returns a resource identifying a font file corresponding to the given font 37 // Returns a resource identifying a font file corresponding to the given font
49 // request after applying the browser-specific fallback. 38 // request after applying the browser-specific fallback.
50 // 39 //
51 // Currently Linux-only. 40 // Currently Linux-only.
52 PP_Resource (*GetFontFileWithFallback)( 41 PP_Resource (*GetFontFileWithFallback)(
53 PP_Instance instance, 42 PP_Instance instance,
54 const struct PP_BrowserFont_Trusted_Description* description, 43 const struct PP_BrowserFont_Trusted_Description* description,
55 PP_PrivateFontCharset charset); 44 PP_PrivateFontCharset charset);
56 45
57 // Given a resource previously returned by GetFontFileWithFallback, returns 46 // Given a resource previously returned by GetFontFileWithFallback, returns
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Gets pointers to both the mmap'd V8 snapshot files and their sizes. 93 // Gets pointers to both the mmap'd V8 snapshot files and their sizes.
105 // This is needed when loading V8's initial snapshot from external files. 94 // This is needed when loading V8's initial snapshot from external files.
106 void (*GetV8ExternalSnapshotData)(PP_Instance instance, 95 void (*GetV8ExternalSnapshotData)(PP_Instance instance,
107 const char** natives_data_out, 96 const char** natives_data_out,
108 int* natives_size_out, 97 int* natives_size_out,
109 const char** snapshot_data_out, 98 const char** snapshot_data_out,
110 int* snapshot_size_out); 99 int* snapshot_size_out);
111 }; 100 };
112 101
113 #endif // PPAPI_C_PRIVATE_PPB_PDF_H_ 102 #endif // PPAPI_C_PRIVATE_PPB_PDF_H_
OLDNEW
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | ppapi/cpp/private/pdf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698