Chromium Code Reviews| 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_WEBPLUGIN_PRINT_DELEGATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "third_party/npapi/bindings/npapi_extensions.h" | 9 #include "third_party/npapi/bindings/npapi_extensions.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" | |
|
Lei Zhang
2010/12/15 00:51:35
You can't forward declare WebKit::WebCanvas?
Elliot Glaysher
2010/12/15 17:34:41
Nope. It's a bunch of ifdefed typedefs.
| |
| 10 | 11 |
| 11 namespace gfx { | 12 namespace gfx { |
| 12 class Rect; | 13 class Rect; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace webkit_glue { | 16 namespace webkit_glue { |
| 16 | 17 |
| 17 // Interface for the NPAPI print extension. This class implements "NOP" | 18 // Interface for the NPAPI print extension. This class implements "NOP" |
| 18 // versions of all these functions so it can be used seamlessly by the | 19 // versions of all these functions so it can be used seamlessly by the |
| 19 // "regular" plugin delegate while being overridden by the "pepper" one. | 20 // "regular" plugin delegate while being overridden by the "pepper" one. |
| 20 class WebPluginPrintDelegate { | 21 class WebPluginPrintDelegate { |
| 21 public: | 22 public: |
| 22 // If a plugin supports print extensions, then it gets to participate fully | 23 // If a plugin supports print extensions, then it gets to participate fully |
| 23 // in the browser's print workflow by specifying the number of pages to be | 24 // in the browser's print workflow by specifying the number of pages to be |
| 24 // printed and providing a print output for specified pages. | 25 // printed and providing a print output for specified pages. |
| 25 virtual bool PrintSupportsPrintExtension() { | 26 virtual bool PrintSupportsPrintExtension(); |
| 26 return false; | |
| 27 } | |
| 28 | 27 |
| 29 // Note: printable_area is in points (a point is 1/72 of an inch). | 28 // Note: printable_area is in points (a point is 1/72 of an inch). |
| 30 virtual int PrintBegin(const gfx::Rect& printable_area, int printer_dpi) { | 29 virtual int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); |
| 31 return 0; | |
| 32 } | |
| 33 | 30 |
| 34 virtual bool PrintPage(int page_number, WebKit::WebCanvas* canvas) { | 31 virtual bool PrintPage(int page_number, WebKit::WebCanvas* canvas); |
| 35 return false; | |
| 36 } | |
| 37 | 32 |
| 38 virtual void PrintEnd() { | 33 virtual void PrintEnd(); |
| 39 } | |
| 40 | 34 |
| 41 protected: | 35 protected: |
| 42 WebPluginPrintDelegate() {} | 36 WebPluginPrintDelegate() {} |
| 43 virtual ~WebPluginPrintDelegate() {} | 37 virtual ~WebPluginPrintDelegate() {} |
| 44 }; | 38 }; |
| 45 | 39 |
| 46 } // namespace webkit_glue | 40 } // namespace webkit_glue |
| 47 | 41 |
| 48 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_ | 42 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_ |
| 49 | 43 |
| OLD | NEW |