OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_CPP_PRIVATE_PDF_H_ | 5 #ifndef PPAPI_CPP_PRIVATE_PDF_H_ |
6 #define PPAPI_CPP_PRIVATE_PDF_H_ | 6 #define PPAPI_CPP_PRIVATE_PDF_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/private/ppb_pdf.h" | 10 #include "ppapi/c/private/ppb_pdf.h" |
11 | 11 |
12 struct PP_BrowserFont_Trusted_Description; | 12 struct PP_BrowserFont_Trusted_Description; |
13 | 13 |
14 namespace pp { | 14 namespace pp { |
15 | 15 |
16 class ImageData; | 16 class ImageData; |
17 class InstanceHandle; | 17 class InstanceHandle; |
18 class Var; | 18 class Var; |
19 | 19 |
20 class PDF { | 20 class PDF { |
21 public: | 21 public: |
22 // Returns true if the required interface is available. | 22 // Returns true if the required interface is available. |
23 static bool IsAvailable(); | 23 static bool IsAvailable(); |
24 | 24 |
25 static Var GetLocalizedString(const InstanceHandle& instance, | 25 static Var GetLocalizedString(const InstanceHandle& instance, |
26 PP_ResourceString string_id); | 26 PP_ResourceString string_id); |
27 static ImageData GetResourceImage(const InstanceHandle& instance, | 27 static ImageData GetResourceImage(const InstanceHandle& instance, |
28 PP_ResourceImage image_id); | 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( | 29 static PP_Resource GetFontFileWithFallback( |
36 const InstanceHandle& instance, | 30 const InstanceHandle& instance, |
37 const PP_BrowserFont_Trusted_Description* description, | 31 const PP_BrowserFont_Trusted_Description* description, |
38 PP_PrivateFontCharset charset); | 32 PP_PrivateFontCharset charset); |
39 static bool GetFontTableForPrivateFontFile(PP_Resource font_file, | 33 static bool GetFontTableForPrivateFontFile(PP_Resource font_file, |
40 uint32_t table, | 34 uint32_t table, |
41 void* output, | 35 void* output, |
42 uint32_t* output_length); | 36 uint32_t* output_length); |
43 static void SearchString(const InstanceHandle& instance, | 37 static void SearchString(const InstanceHandle& instance, |
44 const unsigned short* string, | 38 const unsigned short* string, |
(...skipping 22 matching lines...) Expand all Loading... |
67 static bool IsOutOfProcess(const InstanceHandle& instance); | 61 static bool IsOutOfProcess(const InstanceHandle& instance); |
68 static void SetSelectedText(const InstanceHandle& instance, | 62 static void SetSelectedText(const InstanceHandle& instance, |
69 const char* selected_text); | 63 const char* selected_text); |
70 static void SetLinkUnderCursor(const InstanceHandle& instance, | 64 static void SetLinkUnderCursor(const InstanceHandle& instance, |
71 const char* url); | 65 const char* url); |
72 }; | 66 }; |
73 | 67 |
74 } // namespace pp | 68 } // namespace pp |
75 | 69 |
76 #endif // PPAPI_CPP_PRIVATE_PDF_H_ | 70 #endif // PPAPI_CPP_PRIVATE_PDF_H_ |
OLD | NEW |