| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 5 #ifndef CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| 6 #define CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 6 #define CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/c/pp_resource.h" |
| 10 #include "ppapi/c/pp_stdint.h" |
| 11 #include "ppapi/c/private/pp_private_font_charset.h" |
| 9 | 12 |
| 13 struct PP_FontDescription_Dev; |
| 10 struct PPB_PDF; | 14 struct PPB_PDF; |
| 11 | 15 |
| 12 class PPB_PDF_Impl { | 16 class PPB_PDF_Impl { |
| 13 public: | 17 public: |
| 14 // Returns a pointer to the interface implementing PPB_PDF that is exposed | 18 // Returns a pointer to the interface implementing PPB_PDF that is exposed |
| 15 // to the plugin. | 19 // to the plugin. |
| 16 static const PPB_PDF* GetInterface(); | 20 static const PPB_PDF* GetInterface(); |
| 17 | 21 |
| 22 // Returns a resource identifying a font file corresponding to the given font |
| 23 // request after applying the browser-specific fallback. |
| 24 // |
| 25 // Currently Linux-only. |
| 26 static PP_Resource GetFontFileWithFallback( |
| 27 PP_Instance instance_id, |
| 28 const PP_FontDescription_Dev* description, |
| 29 PP_PrivateFontCharset charset); |
| 30 |
| 31 // Given a resource previously returned by GetFontFileWithFallback, returns |
| 32 // a pointer to the requested font table. Linux only. |
| 33 static bool GetFontTableForPrivateFontFile(PP_Resource font_file, |
| 34 uint32_t table, |
| 35 void* output, |
| 36 uint32_t* output_length); |
| 37 |
| 18 // Invokes the "Print" command for the given instance as if the user right | 38 // Invokes the "Print" command for the given instance as if the user right |
| 19 // clicked on it and selected "Print". | 39 // clicked on it and selected "Print". |
| 20 static void InvokePrintingForInstance(PP_Instance instance); | 40 static void InvokePrintingForInstance(PP_Instance instance); |
| 21 }; | 41 }; |
| 22 | 42 |
| 23 #endif // CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 43 #endif // CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| 24 | 44 |
| OLD | NEW |