cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / cpp / private / pdf.h
blob893f9e3f2791d58a6d7fd30c94b0199fd269811c
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_
8 #include <string>
10 #include "ppapi/c/private/ppb_pdf.h"
12 struct PP_BrowserFont_Trusted_Description;
14 namespace pp {
16 class ImageData;
17 class InstanceHandle;
18 class Var;
20 class PDF {
21 public:
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,
40 uint32_t table,
41 void* output,
42 uint32_t* output_length);
43 static void SearchString(const InstanceHandle& instance,
44 const unsigned short* string,
45 const unsigned short* term,
46 bool case_sensitive,
47 PP_PrivateFindResult** results,
48 int* count);
49 static void DidStartLoading(const InstanceHandle& instance);
50 static void DidStopLoading(const InstanceHandle& instance);
51 static void SetContentRestriction(const InstanceHandle& instance,
52 int restrictions);
53 static void HistogramPDFPageCount(const InstanceHandle& instance,
54 int count);
55 static void UserMetricsRecordAction(const InstanceHandle& instance,
56 const Var& action);
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,
64 float scale);
67 } // namespace pp
69 #endif // PPAPI_CPP_PRIVATE_PDF_H_