Revert of Use ExtensionRegistryObserver instead of deprecated extension notification...
[chromium-blink-merge.git] / ppapi / cpp / private / pdf.h
blob586952c98bee71d83ef7e591826604fd057fd08d
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 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,
34 uint32_t table,
35 void* output,
36 uint32_t* output_length);
37 static void SearchString(const InstanceHandle& instance,
38 const unsigned short* string,
39 const unsigned short* term,
40 bool case_sensitive,
41 PP_PrivateFindResult** results,
42 int* count);
43 static void DidStartLoading(const InstanceHandle& instance);
44 static void DidStopLoading(const InstanceHandle& instance);
45 static void SetContentRestriction(const InstanceHandle& instance,
46 int restrictions);
47 static void HistogramPDFPageCount(const InstanceHandle& instance,
48 int count);
49 static void UserMetricsRecordAction(const InstanceHandle& instance,
50 const Var& action);
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,
58 float scale);
59 static Var ModalPromptForPassword(const InstanceHandle& instance,
60 Var message);
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,
65 const char* url);
68 } // namespace pp
70 #endif // PPAPI_CPP_PRIVATE_PDF_H_