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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 | 468 |
469 // Reformats the WebFrame for printing. WebPrintParams specifies the printab
le | 469 // Reformats the WebFrame for printing. WebPrintParams specifies the printab
le |
470 // content size, paper size, printable area size, printer DPI and print | 470 // content size, paper size, printable area size, printer DPI and print |
471 // scaling option. If constrainToNode node is specified, then only the given
node | 471 // scaling option. If constrainToNode node is specified, then only the given
node |
472 // is printed (for now only plugins are supported), instead of the entire fr
ame. | 472 // is printed (for now only plugins are supported), instead of the entire fr
ame. |
473 // Returns the number of pages that can be printed at the given | 473 // Returns the number of pages that can be printed at the given |
474 // page size. | 474 // page size. |
475 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode
= WebNode()) = 0; | 475 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode
= WebNode()) = 0; |
476 | 476 |
477 // Returns the page shrinking factor calculated by webkit (usually | 477 // Returns the page shrinking factor calculated by webkit (usually |
478 // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or | 478 // between 1/1.33 and 1/2). Returns 0 if the page number is invalid or |
479 // not in printing mode. | 479 // not in printing mode. |
480 virtual float getPrintPageShrink(int page) = 0; | 480 virtual float getPrintPageShrink(int page) = 0; |
481 | 481 |
482 // Prints one page, and returns the calculated page shrinking factor | 482 // Prints one page, and returns the calculated page shrinking factor |
483 // (usually between 1/1.25 and 1/2). Returns 0 if the page number is | 483 // (usually between 1/1.33 and 1/2). Returns 0 if the page number is |
484 // invalid or not in printing mode. | 484 // invalid or not in printing mode. |
485 virtual float printPage(int pageToPrint, WebCanvas*) = 0; | 485 virtual float printPage(int pageToPrint, WebCanvas*) = 0; |
486 | 486 |
487 // Reformats the WebFrame for screen display. | 487 // Reformats the WebFrame for screen display. |
488 virtual void printEnd() = 0; | 488 virtual void printEnd() = 0; |
489 | 489 |
490 // If the frame contains a full-frame plugin or the given node refers to a | 490 // If the frame contains a full-frame plugin or the given node refers to a |
491 // plugin whose content indicates that printed output should not be scaled, | 491 // plugin whose content indicates that printed output should not be scaled, |
492 // return true, otherwise return false. | 492 // return true, otherwise return false. |
493 virtual bool isPrintScalingDisabledForPlugin(const WebNode& = WebNode()) = 0
; | 493 virtual bool isPrintScalingDisabledForPlugin(const WebNode& = WebNode()) = 0
; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 WebFrame* m_firstChild; | 604 WebFrame* m_firstChild; |
605 WebFrame* m_lastChild; | 605 WebFrame* m_lastChild; |
606 | 606 |
607 WebFrame* m_opener; | 607 WebFrame* m_opener; |
608 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; | 608 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; |
609 }; | 609 }; |
610 | 610 |
611 } // namespace blink | 611 } // namespace blink |
612 | 612 |
613 #endif | 613 #endif |
OLD | NEW |