OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 458 |
459 virtual void setCaretVisible(bool) = 0; | 459 virtual void setCaretVisible(bool) = 0; |
460 | 460 |
461 // Printing ------------------------------------------------------------ | 461 // Printing ------------------------------------------------------------ |
462 | 462 |
463 // Reformats the WebFrame for printing. WebPrintParams specifies the printab
le | 463 // Reformats the WebFrame for printing. WebPrintParams specifies the printab
le |
464 // content size, paper size, printable area size, printer DPI and print | 464 // content size, paper size, printable area size, printer DPI and print |
465 // scaling option. If constrainToNode node is specified, then only the given
node | 465 // scaling option. If constrainToNode node is specified, then only the given
node |
466 // is printed (for now only plugins are supported), instead of the entire fr
ame. | 466 // is printed (for now only plugins are supported), instead of the entire fr
ame. |
467 // Returns the number of pages that can be printed at the given | 467 // Returns the number of pages that can be printed at the given |
468 // page size. The out param useBrowserOverlays specifies whether the browser | 468 // page size. |
469 // process should use its overlays (header, footer, margins etc) or whether | 469 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode
= WebNode()) = 0; |
470 // the renderer controls this. | |
471 virtual int printBegin(const WebPrintParams&, | |
472 const WebNode& constrainToNode = WebNode(), | |
473 bool* useBrowserOverlays = 0) = 0; | |
474 | 470 |
475 // Returns the page shrinking factor calculated by webkit (usually | 471 // Returns the page shrinking factor calculated by webkit (usually |
476 // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or | 472 // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or |
477 // not in printing mode. | 473 // not in printing mode. |
478 virtual float getPrintPageShrink(int page) = 0; | 474 virtual float getPrintPageShrink(int page) = 0; |
479 | 475 |
480 // Prints one page, and returns the calculated page shrinking factor | 476 // Prints one page, and returns the calculated page shrinking factor |
481 // (usually between 1/1.25 and 1/2). Returns 0 if the page number is | 477 // (usually between 1/1.25 and 1/2). Returns 0 if the page number is |
482 // invalid or not in printing mode. | 478 // invalid or not in printing mode. |
483 virtual float printPage(int pageToPrint, WebCanvas*) = 0; | 479 virtual float printPage(int pageToPrint, WebCanvas*) = 0; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 // text form. This is used only by layout tests. | 646 // text form. This is used only by layout tests. |
651 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 647 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
652 | 648 |
653 protected: | 649 protected: |
654 ~WebFrame() { } | 650 ~WebFrame() { } |
655 }; | 651 }; |
656 | 652 |
657 } // namespace WebKit | 653 } // namespace WebKit |
658 | 654 |
659 #endif | 655 #endif |
OLD | NEW |