Chromium Code Reviews| Index: chrome/browser/ui/webui/print_preview_handler.cc |
| diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc |
| index 22be5a7b5703d9d1c1386aff734205536e984952..abdb3571a7f293b6c55964c2dc51833f775c9e51 100644 |
| --- a/chrome/browser/ui/webui/print_preview_handler.cc |
| +++ b/chrome/browser/ui/webui/print_preview_handler.cc |
| @@ -489,6 +489,16 @@ void PrintPreviewHandler::HandleGetPreview(const ListValue* args) { |
| print_preview_ui->OnPrintPreviewFailed(); |
| return; |
| } |
| + |
| + // Retrieve the page title and url and send it to the renderer process. |
| + settings->SetString(printing::kSettingHeaderFooterTitle, |
|
kmadhusu
2011/08/01 17:17:08
Set the header and footer info in |settings| only
Aayush Kumar
2011/08/02 00:18:13
Done.
|
| + initiator_tab->GetTitle()); |
| + std::string url; |
| + NavigationEntry* entry = initiator_tab->controller().GetActiveEntry(); |
| + if (entry) |
| + url = entry->virtual_url().spec(); |
| + settings->SetString(printing::kSettingHeaderFooterURL, url); |
| + |
| VLOG(1) << "Print preview request start"; |
| RenderViewHost* rvh = initiator_tab->render_view_host(); |
| rvh->Send(new PrintMsg_PrintPreview(rvh->routing_id(), *settings)); |