Chromium Code Reviews| Index: chrome/renderer/print_web_view_helper.cc |
| diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc |
| index 250ed0fe08332ccc047bedc25deecb241afcb0c4..b799a4c5f4e164971b3b559880989a6d6edcc551 100644 |
| --- a/chrome/renderer/print_web_view_helper.cc |
| +++ b/chrome/renderer/print_web_view_helper.cc |
| @@ -109,7 +109,9 @@ bool PrintMsg_Print_Params_IsEqual( |
| oldParams.params.title == newParams.params.title && |
| oldParams.params.url == newParams.params.url && |
| std::equal(oldParams.pages.begin(), oldParams.pages.end(), |
| - newParams.pages.begin()); |
| + newParams.pages.begin()) && |
| + oldParams.params.should_print_backgrounds == |
| + newParams.params.should_print_backgrounds; |
| } |
| PrintMsg_Print_Params GetCssPrintParams( |
| @@ -1290,6 +1292,14 @@ bool PrintWebViewHelper::UpdatePrintSettings( |
| PrintMsg_PrintPages_Params settings; |
| Send(new PrintHostMsg_UpdatePrintSettings(routing_id(), |
| cookie, *job_settings, &settings)); |
| + |
| + // Apply whether to print CSS backgrounds. |
| + bool shouldPrintBackgrounds = false; |
| + job_settings->GetBoolean(printing::kSettingShouldPrintBackgrounds, |
| + &shouldPrintBackgrounds); |
| + frame->view()->settings()->setShouldPrintBackgrounds(shouldPrintBackgrounds); |
|
Lei Zhang
2013/01/10 23:30:11
This probably should go into PrintWebViewHelper::P
Toscano
2013/01/11 00:19:23
Hey Lei, I actually moved this to inside of the Pr
|
| + settings.params.should_print_backgrounds = shouldPrintBackgrounds; |
| + |
| print_pages_params_.reset(new PrintMsg_PrintPages_Params(settings)); |
| if (!PrintMsg_Print_Params_IsValid(settings.params)) { |
| @@ -1349,6 +1359,7 @@ bool PrintWebViewHelper::UpdatePrintSettings( |
| print_pages_params_.reset(new PrintMsg_PrintPages_Params(settings)); |
| Send(new PrintHostMsg_DidGetDocumentCookie(routing_id(), |
| settings.params.document_cookie)); |
| + |
| return true; |
| } |