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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 8515017: Print Preview: Properly handle window.print(). (Closed)
Patch Set: fail instead of crash when 2 views both do window.print() 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
« no previous file with comments | « chrome/common/print_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb97e80afc48e502a2699d6cb1d35b32ada9520a..8ee1c07110fa2236c31b2c9763f98faa391fb50b 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());
}
« no previous file with comments | « chrome/common/print_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698