diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:27:10 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:27:10 +0000 |
commit | 8604f721e712cb420da697d377f5fcfb706a3126 (patch) | |
tree | 00e31398d9013dcb74f972d6a3d26c4fae6ccb6e /chrome/renderer/print_web_view_helper.cc | |
parent | 205137b36e97ae29017a1d813cf95f7f58b35171 (diff) | |
download | chromium_src-8604f721e712cb420da697d377f5fcfb706a3126.zip chromium_src-8604f721e712cb420da697d377f5fcfb706a3126.tar.gz chromium_src-8604f721e712cb420da697d377f5fcfb706a3126.tar.bz2 |
Print Preview: Fix hanging browser process on Windows.
BUG=none
TEST=Start Chrome with print preview enabled, access print preview and quit.
Review URL: http://codereview.chromium.org/5289004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.cc')
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 6d8e2fd..751b9ec 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -227,9 +227,11 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params, frame->view()); int page_count = prep_frame_view.GetExpectedPageCount(); - Send(new ViewHostMsg_DidGetPrintedPagesCount(routing_id(), - printParams.document_cookie, - page_count)); + if (!is_preview_) { + Send(new ViewHostMsg_DidGetPrintedPagesCount(routing_id(), + printParams.document_cookie, + page_count)); + } if (!page_count) return; @@ -249,6 +251,13 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params, PrintPage(page_params, canvas_size, frame); } } + + if (is_preview_) { + // TODO(kmadhusu) Put this in the right place when fixing bug 64121. + Send(new ViewHostMsg_PagesReadyForPreview(routing_id(), + printParams.document_cookie, + -1)); + } } #endif // OS_MACOSX || OS_WIN |