| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 class WebDataSource; | 48 class WebDataSource; |
| 49 class WebDragData; | 49 class WebDragData; |
| 50 class WebInputEvent; | 50 class WebInputEvent; |
| 51 class WebPluginContainer; | 51 class WebPluginContainer; |
| 52 class WebURLResponse; | 52 class WebURLResponse; |
| 53 struct WebCompositionUnderline; | 53 struct WebCompositionUnderline; |
| 54 struct WebCursorInfo; | 54 struct WebCursorInfo; |
| 55 struct WebPluginParams; | 55 struct WebPluginParams; |
| 56 struct WebPrintParams; | 56 struct WebPrintParams; |
| 57 struct WebPrintPresetOptions; |
| 57 struct WebPoint; | 58 struct WebPoint; |
| 58 struct WebRect; | 59 struct WebRect; |
| 59 struct WebTextInputInfo; | 60 struct WebTextInputInfo; |
| 60 struct WebURLError; | 61 struct WebURLError; |
| 61 template <typename T> class WebVector; | 62 template <typename T> class WebVector; |
| 62 | 63 |
| 63 class WebPlugin { | 64 class WebPlugin { |
| 64 public: | 65 public: |
| 65 virtual bool initialize(WebPluginContainer*) = 0; | 66 virtual bool initialize(WebPluginContainer*) = 0; |
| 66 virtual void destroy() = 0; | 67 virtual void destroy() = 0; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual void didFailLoadingFrameRequest( | 115 virtual void didFailLoadingFrameRequest( |
| 115 const WebURL&, void* notifyData, const WebURLError&) = 0; | 116 const WebURL&, void* notifyData, const WebURLError&) = 0; |
| 116 | 117 |
| 117 // Printing interface. | 118 // Printing interface. |
| 118 // Whether the plugin supports its own paginated print. The other print | 119 // Whether the plugin supports its own paginated print. The other print |
| 119 // interface methods are called only if this method returns true. | 120 // interface methods are called only if this method returns true. |
| 120 virtual bool supportsPaginatedPrint() { return false; } | 121 virtual bool supportsPaginatedPrint() { return false; } |
| 121 // Returns true if the printed content should not be scaled to | 122 // Returns true if the printed content should not be scaled to |
| 122 // the printer's printable area. | 123 // the printer's printable area. |
| 123 virtual bool isPrintScalingDisabled() { return false; } | 124 virtual bool isPrintScalingDisabled() { return false; } |
| 124 // Returns number of copies to be printed. | 125 // Returns true on success and sets the out parameter to the print preset op
tions for the document. |
| 125 virtual int getCopiesToPrint() { return 1; } | 126 virtual bool getPrintPresetOptionsFromDocument(WebPrintPresetOptions*) { ret
urn false; } |
| 126 | 127 |
| 127 // Sets up printing with the specified printParams. Returns the number of | 128 // Sets up printing with the specified printParams. Returns the number of |
| 128 // pages to be printed at these settings. | 129 // pages to be printed at these settings. |
| 129 virtual int printBegin(const WebPrintParams& printParams) { return 0; } | 130 virtual int printBegin(const WebPrintParams& printParams) { return 0; } |
| 130 | 131 |
| 131 // Prints the page specified by pageNumber (0-based index) into the supplied
canvas. | 132 // Prints the page specified by pageNumber (0-based index) into the supplied
canvas. |
| 132 virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } | 133 virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } |
| 133 // Ends the print operation. | 134 // Ends the print operation. |
| 134 virtual void printEnd() { } | 135 virtual void printEnd() { } |
| 135 | 136 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 virtual bool isPlaceholder() { return true; } | 181 virtual bool isPlaceholder() { return true; } |
| 181 virtual bool shouldPersist() const { return false; } | 182 virtual bool shouldPersist() const { return false; } |
| 182 | 183 |
| 183 protected: | 184 protected: |
| 184 ~WebPlugin() { } | 185 ~WebPlugin() { } |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 } // namespace blink | 188 } // namespace blink |
| 188 | 189 |
| 189 #endif | 190 #endif |
| OLD | NEW |