Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5647)

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 8515017: Print Preview: Properly handle window.print(). (Closed)
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1b4008a97bcaa5d503a430d14b999bc5e1d91754..638a178c93ac82caef2eabcc50bf36e93bb27844 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -462,7 +462,11 @@ void PrintWebViewHelper::PrintPage(WebKit::WebFrame* frame) {
if (is_preview_enabled_) {
print_preview_context_.InitWithFrame(frame);
- RequestPrintPreview();
+
+ old_print_pages_params_.reset(); // Same as in RequestPrintPreview().
+ IPC::SyncMessage* msg = new PrintHostMsg_ScriptedPrintPreview(routing_id());
+ msg->EnableMessagePumping();
+ Send(msg);
} else {
Print(frame, WebNode());
}
« chrome/browser/printing/print_view_manager.cc ('K') | « chrome/common/print_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698