1 // Copyright (c) 2013 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.
5 #ifndef PPAPI_CPP_PRIVATE_PDF_H_
6 #define PPAPI_CPP_PRIVATE_PDF_H_
10 #include "ppapi/c/private/ppb_pdf.h"
12 struct PP_BrowserFont_Trusted_Description
;
22 // Returns true if the required interface is available.
23 static bool IsAvailable();
25 static Var
GetLocalizedString(const InstanceHandle
& instance
,
26 PP_ResourceString string_id
);
27 static ImageData
GetResourceImage(const InstanceHandle
& instance
,
28 PP_ResourceImage image_id
);
29 // TODO(raymes): Remove this version when the PDF code is changed to use
30 // PP_BrowserFont_Trusted_Description.
31 static PP_Resource
GetFontFileWithFallback(
32 const InstanceHandle
& instance
,
33 const PP_FontDescription_Dev
* description
,
34 PP_PrivateFontCharset charset
);
35 static PP_Resource
GetFontFileWithFallback(
36 const InstanceHandle
& instance
,
37 const PP_BrowserFont_Trusted_Description
* description
,
38 PP_PrivateFontCharset charset
);
39 static bool GetFontTableForPrivateFontFile(PP_Resource font_file
,
42 uint32_t* output_length
);
43 static void SearchString(const InstanceHandle
& instance
,
44 const unsigned short* string
,
45 const unsigned short* term
,
47 PP_PrivateFindResult
** results
,
49 static void DidStartLoading(const InstanceHandle
& instance
);
50 static void DidStopLoading(const InstanceHandle
& instance
);
51 static void SetContentRestriction(const InstanceHandle
& instance
,
53 static void HistogramPDFPageCount(const InstanceHandle
& instance
,
55 static void UserMetricsRecordAction(const InstanceHandle
& instance
,
57 static void HasUnsupportedFeature(const InstanceHandle
& instance
);
58 static void SaveAs(const InstanceHandle
& instance
);
59 static void Print(const InstanceHandle
& instance
);
60 static bool IsFeatureEnabled(const InstanceHandle
& instance
,
61 PP_PDFFeature feature
);
62 static ImageData
GetResourceImageForScale(const InstanceHandle
& instance
,
63 PP_ResourceImage image_id
,
69 #endif // PPAPI_CPP_PRIVATE_PDF_H_