Add "silent" and "print_background" option for printing.

This commit is contained in:
Cheng Zhao 2014-08-22 15:01:07 +08:00
parent d0c1b63064
commit e43b3309af
10 changed files with 56 additions and 34 deletions

View file

@ -60,8 +60,9 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
bool PrintViewManagerBase::PrintNow() {
return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
bool PrintViewManagerBase::PrintNow(bool silent, bool print_background) {
return PrintNowInternal(new PrintMsg_PrintPages(
routing_id(), silent, print_background));
}
void PrintViewManagerBase::NavigationStopped() {

View file

@ -37,7 +37,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
virtual bool PrintNow();
virtual bool PrintNow(bool silent, bool print_background);
// PrintedPagesSource implementation.
virtual base::string16 RenderSourceName() OVERRIDE;