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 static PP_Resource
GetFontFileWithFallback(
30 const InstanceHandle
& instance
,
31 const PP_BrowserFont_Trusted_Description
* description
,
32 PP_PrivateFontCharset charset
);
33 static bool GetFontTableForPrivateFontFile(PP_Resource font_file
,
36 uint32_t* output_length
);
37 static void SearchString(const InstanceHandle
& instance
,
38 const unsigned short* string
,
39 const unsigned short* term
,
41 PP_PrivateFindResult
** results
,
43 static void DidStartLoading(const InstanceHandle
& instance
);
44 static void DidStopLoading(const InstanceHandle
& instance
);
45 static void SetContentRestriction(const InstanceHandle
& instance
,
47 static void HistogramPDFPageCount(const InstanceHandle
& instance
,
49 static void UserMetricsRecordAction(const InstanceHandle
& instance
,
51 static void HasUnsupportedFeature(const InstanceHandle
& instance
);
52 static void SaveAs(const InstanceHandle
& instance
);
53 static void Print(const InstanceHandle
& instance
);
54 static bool IsFeatureEnabled(const InstanceHandle
& instance
,
55 PP_PDFFeature feature
);
56 static ImageData
GetResourceImageForScale(const InstanceHandle
& instance
,
57 PP_ResourceImage image_id
,
59 static Var
ModalPromptForPassword(const InstanceHandle
& instance
,
61 static bool IsOutOfProcess(const InstanceHandle
& instance
);
62 static void SetSelectedText(const InstanceHandle
& instance
,
63 const char* selected_text
);
64 static void SetLinkUnderCursor(const InstanceHandle
& instance
,
70 #endif // PPAPI_CPP_PRIVATE_PDF_H_