diff options
Diffstat (limited to 'WebKit/chromium/public/WebPlugin.h')
| -rw-r--r-- | WebKit/chromium/public/WebPlugin.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h index 5097265..816d38b 100644 --- a/WebKit/chromium/public/WebPlugin.h +++ b/WebKit/chromium/public/WebPlugin.h @@ -32,6 +32,7 @@ #define WebPlugin_h #include "WebCanvas.h" +#include "WebString.h" struct NPObject; @@ -80,6 +81,37 @@ public: virtual void didFailLoadingFrameRequest( const WebURL&, void* notifyData, const WebURLError&) = 0; + // Printing interface. + // Whether the plugin supports its own paginated print. The other print + // interface methods are called only if this method returns true. + virtual bool supportsPaginatedPrint() { return false; } + // Sets up printing at the given print rect and printer DPI. printableArea + // is in points (a point is 1/72 of an inch).Returns the number of pages to + // be printed at these settings. + virtual int printBegin(const WebRect& printableArea, int printerDPI) { return 0; } + // Prints the page specified by pageNumber (0-based index) into the supplied canvas. + virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } + // Ends the print operation. + virtual void printEnd() { } + + virtual bool hasSelection() const { return false; } + virtual WebString selectionAsText() const { return WebString(); } + virtual WebString selectionAsMarkup() const { return WebString(); } + + // Used for zooming of full page plugins. + virtual void setZoomFactor(float scale, bool textOnly) { } + + // Find interface. + // Start a new search. The plugin should search for a little bit at a time so that it + // doesn't block the thread in case of a large document. The results, along with the + // find's identifier, should be sent asynchronously to WebFrameClient's reportFindInPage* methods. + // Returns true if the search started, or false if the plugin doesn't support search. + virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; } + // Tells the plugin to jump forward or backward in the list of find results. + virtual void selectFindResult(bool forward) { } + // Tells the plugin that the user has stopped the find operation. + virtual void stopFind() { } + protected: ~WebPlugin() { } }; |
