| Index: chrome/renderer/render_view.cc
|
| ===================================================================
|
| --- chrome/renderer/render_view.cc (revision 18804)
|
| +++ chrome/renderer/render_view.cc (working copy)
|
| @@ -339,6 +339,7 @@
|
| IPC_BEGIN_MESSAGE_MAP(RenderView, message)
|
| IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, SendThumbnail)
|
| IPC_MESSAGE_HANDLER(ViewMsg_PrintPages, OnPrintPages)
|
| + IPC_MESSAGE_HANDLER(ViewMsg_PrintingDone, OnPrintingDone)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Navigate, OnNavigate)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop)
|
| IPC_MESSAGE_HANDLER(ViewMsg_LoadAlternateHTMLText, OnLoadAlternateHTMLText)
|
| @@ -454,6 +455,15 @@
|
| }
|
| }
|
|
|
| +void RenderView::OnPrintingDone(int document_cookie, bool success) {
|
| + // Ignoring document cookie here since only one print job can be outstanding
|
| + // per renderer and document_cookie is 0 when printing is successful.
|
| + DCHECK(print_helper_.get());
|
| + if (print_helper_.get() != NULL) {
|
| + print_helper_->DidFinishPrinting(success);
|
| + }
|
| +}
|
| +
|
| void RenderView::CapturePageInfo(int load_id, bool preliminary_capture) {
|
| if (load_id != page_id_)
|
| return; // this capture call is no longer relevant due to navigation
|
| @@ -2217,9 +2227,10 @@
|
| }
|
|
|
| void RenderView::ScriptedPrint(WebFrame* frame) {
|
| - print_render_view_.reset(new PrintWebViewHelper(this));
|
| - print_render_view_->SyncPrint(frame);
|
| - print_render_view_.reset();
|
| + if (print_helper_.get() == NULL) {
|
| + print_helper_.reset(new PrintWebViewHelper(this));
|
| + }
|
| + print_helper_->SyncPrint(frame);
|
| }
|
|
|
| void RenderView::WebInspectorOpened(int num_resources) {
|
|
|