| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_C_PRIVATE_PPB_PDF_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPB_PDF_H_ |
| 6 #define PPAPI_C_PRIVATE_PPB_PDF_H_ | 6 #define PPAPI_C_PRIVATE_PPB_PDF_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_font_dev.h" | 8 #include "ppapi/c/dev/ppb_font_dev.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool italic; | 75 bool italic; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 struct PP_PrivateFindResult { | 78 struct PP_PrivateFindResult { |
| 79 int start_index; | 79 int start_index; |
| 80 int length; | 80 int length; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 struct PPB_PDF { | 83 struct PPB_PDF { |
| 84 // Returns a localized string. | 84 // Returns a localized string. |
| 85 PP_Var (*GetLocalizedString)(PP_Instance instance, | 85 struct PP_Var (*GetLocalizedString)(PP_Instance instance, |
| 86 PP_ResourceString string_id); | 86 PP_ResourceString string_id); |
| 87 | 87 |
| 88 // Returns a resource image. | 88 // Returns a resource image. |
| 89 PP_Resource (*GetResourceImage)(PP_Instance instance, | 89 PP_Resource (*GetResourceImage)(PP_Instance instance, |
| 90 PP_ResourceImage image_id); | 90 PP_ResourceImage image_id); |
| 91 | 91 |
| 92 // Returns a resource identifying a font file corresponding to the given font | 92 // Returns a resource identifying a font file corresponding to the given font |
| 93 // request after applying the browser-specific fallback. | 93 // request after applying the browser-specific fallback. |
| 94 // | 94 // |
| 95 // Currently Linux-only. | 95 // Currently Linux-only. |
| 96 PP_Resource (*GetFontFileWithFallback)( | 96 PP_Resource (*GetFontFileWithFallback)( |
| 97 PP_Instance instance, | 97 PP_Instance instance, |
| 98 const PP_FontDescription_Dev* description, | 98 const struct PP_FontDescription_Dev* description, |
| 99 PP_PrivateFontCharset charset); | 99 PP_PrivateFontCharset charset); |
| 100 | 100 |
| 101 // Given a resource previously returned by GetFontFileWithFallback, returns | 101 // Given a resource previously returned by GetFontFileWithFallback, returns |
| 102 // a pointer to the requested font table. Linux only. | 102 // a pointer to the requested font table. Linux only. |
| 103 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, | 103 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, |
| 104 uint32_t table, | 104 uint32_t table, |
| 105 void* output, | 105 void* output, |
| 106 uint32_t* output_length); | 106 uint32_t* output_length); |
| 107 | 107 |
| 108 // Search the given string using ICU. Use PPB_Core's MemFree on results when | 108 // Search the given string using ICU. Use PPB_Core's MemFree on results when |
| 109 // done. | 109 // done. |
| 110 void (*SearchString)( | 110 void (*SearchString)( |
| 111 PP_Instance instance, | 111 PP_Instance instance, |
| 112 const unsigned short* string, | 112 const unsigned short* string, |
| 113 const unsigned short* term, | 113 const unsigned short* term, |
| 114 bool case_sensitive, | 114 bool case_sensitive, |
| 115 PP_PrivateFindResult** results, | 115 struct PP_PrivateFindResult** results, |
| 116 int* count); | 116 int* count); |
| 117 | 117 |
| 118 // Since WebFrame doesn't know about PPAPI requests, it'll think the page has | 118 // Since WebFrame doesn't know about PPAPI requests, it'll think the page has |
| 119 // finished loading even if there are outstanding requests by the plugin. | 119 // finished loading even if there are outstanding requests by the plugin. |
| 120 // Take this out once WebFrame knows about requests by PPAPI plugins. | 120 // Take this out once WebFrame knows about requests by PPAPI plugins. |
| 121 void (*DidStartLoading)(PP_Instance instance); | 121 void (*DidStartLoading)(PP_Instance instance); |
| 122 void (*DidStopLoading)(PP_Instance instance); | 122 void (*DidStopLoading)(PP_Instance instance); |
| 123 | 123 |
| 124 // Sets content restriction for a full-page plugin (i.e. can't copy/print). | 124 // Sets content restriction for a full-page plugin (i.e. can't copy/print). |
| 125 // The value is a bitfield of ContentRestriction enums. | 125 // The value is a bitfield of ContentRestriction enums. |
| 126 void (*SetContentRestriction)(PP_Instance instance, int restrictions); | 126 void (*SetContentRestriction)(PP_Instance instance, int restrictions); |
| 127 | 127 |
| 128 // Use UMA so we know average pdf page count. | 128 // Use UMA so we know average pdf page count. |
| 129 void (*HistogramPDFPageCount)(int count); | 129 void (*HistogramPDFPageCount)(int count); |
| 130 | 130 |
| 131 // Notifies the browser that the given action has been performed. | 131 // Notifies the browser that the given action has been performed. |
| 132 void (*UserMetricsRecordAction)(PP_Var action); | 132 void (*UserMetricsRecordAction)(struct PP_Var action); |
| 133 | 133 |
| 134 // Notifies the browser that the PDF has an unsupported feature. | 134 // Notifies the browser that the PDF has an unsupported feature. |
| 135 void (*HasUnsupportedFeature)(PP_Instance instance); | 135 void (*HasUnsupportedFeature)(PP_Instance instance); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // PPAPI_C_PRIVATE_PPB_PDF_H_ | 138 #endif // PPAPI_C_PRIVATE_PPB_PDF_H_ |
| OLD | NEW |