| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_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_module.h" | 10 #include "ppapi/c/pp_module.h" |
| 11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 12 #include "ppapi/c/pp_var.h" | 12 #include "ppapi/c/pp_var.h" |
| 13 | 13 |
| 14 #define PPB_PRIVATE_INTERFACE "PPB_Private;1" | 14 #define PPB_PDF_INTERFACE "PPB_Pdf;1" |
| 15 | 15 |
| 16 // From the public PPB_Font_Dev file. | 16 // From the public PPB_Font_Dev file. |
| 17 struct PP_FontDescription_Dev; | 17 struct PP_FontDescription_Dev; |
| 18 | 18 |
| 19 typedef enum { | 19 typedef enum { |
| 20 PP_RESOURCESTRING_PDFGETPASSWORD = 0, | 20 PP_RESOURCESTRING_PDFGETPASSWORD = 0, |
| 21 PP_RESOURCESTRING_PDFLOADING = 1, | 21 PP_RESOURCESTRING_PDFLOADING = 1, |
| 22 PP_RESOURCESTRING_PDFLOAD_FAILED = 2, | 22 PP_RESOURCESTRING_PDFLOAD_FAILED = 2, |
| 23 } PP_ResourceString; | 23 } PP_ResourceString; |
| 24 | 24 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const char* face; | 74 const char* face; |
| 75 uint32_t weight; | 75 uint32_t weight; |
| 76 bool italic; | 76 bool italic; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 struct PP_PrivateFindResult { | 79 struct PP_PrivateFindResult { |
| 80 int start_index; | 80 int start_index; |
| 81 int length; | 81 int length; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 struct PPB_Private { | 84 struct PPB_Pdf { |
| 85 // Returns a localized string. | 85 // Returns a localized string. |
| 86 PP_Var (*GetLocalizedString)(PP_Module module, PP_ResourceString string_id); | 86 PP_Var (*GetLocalizedString)(PP_Module module, PP_ResourceString string_id); |
| 87 | 87 |
| 88 // Returns a resource image. | 88 // Returns a resource image. |
| 89 PP_Resource (*GetResourceImage)(PP_Module module, | 89 PP_Resource (*GetResourceImage)(PP_Module module, |
| 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 // |
| (...skipping 13 matching lines...) Expand all Loading... |
| 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_Module module, | 111 PP_Module module, |
| 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 PP_PrivateFindResult** results, |
| 116 int* count); | 116 int* count); |
| 117 | 117 |
| 118 // Since WebFrame doesn't know about Pepper 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 pepper 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)(PP_Var action); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 135 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
| OLD | NEW |