Android NTP: Most visited tile clicks should have PageTransition.AUTO_BOOKMARK
[chromium-blink-merge.git] / ppapi / cpp / private / pdf.h
blob48ba668e3f9acd275391f2359488657258feb3ec
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 PP_Resource GetFontFileWithFallback(
28 const InstanceHandle& instance,
29 const PP_BrowserFont_Trusted_Description* description,
30 PP_PrivateFontCharset charset);
31 static bool GetFontTableForPrivateFontFile(PP_Resource font_file,
32 uint32_t table,
33 void* output,
34 uint32_t* output_length);
35 static void SearchString(const InstanceHandle& instance,
36 const unsigned short* string,
37 const unsigned short* term,
38 bool case_sensitive,
39 PP_PrivateFindResult** results,
40 int* count);
41 static void DidStartLoading(const InstanceHandle& instance);
42 static void DidStopLoading(const InstanceHandle& instance);
43 static void SetContentRestriction(const InstanceHandle& instance,
44 int restrictions);
45 static void UserMetricsRecordAction(const InstanceHandle& instance,
46 const Var& action);
47 static void HasUnsupportedFeature(const InstanceHandle& instance);
48 static void SaveAs(const InstanceHandle& instance);
49 static void Print(const InstanceHandle& instance);
50 static bool IsFeatureEnabled(const InstanceHandle& instance,
51 PP_PDFFeature feature);
52 static void SetSelectedText(const InstanceHandle& instance,
53 const char* selected_text);
54 static void SetLinkUnderCursor(const InstanceHandle& instance,
55 const char* url);
56 static void GetV8ExternalSnapshotData(const InstanceHandle& instance,
57 const char** natives_data_out,
58 int* natives_size_out,
59 const char** snapshot_data_out,
60 int* snapshot_size_out);
63 } // namespace pp
65 #endif // PPAPI_CPP_PRIVATE_PDF_H_