summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/print_view_manager.cc
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 16:58:07 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 16:58:07 +0000
commit06863722bd6272ce893ba36060a80de7390be326 (patch)
tree439960d981de2b4f06cedacff864fe996a5c4167 /chrome/browser/printing/print_view_manager.cc
parente38ae0bdf147bfda8f000ea6181eed0280c0e2fd (diff)
downloadchromium_src-06863722bd6272ce893ba36060a80de7390be326.zip
chromium_src-06863722bd6272ce893ba36060a80de7390be326.tar.gz
chromium_src-06863722bd6272ce893ba36060a80de7390be326.tar.bz2
Re-land revision 8821 with the ui test fixed.
Disconnect the "browser controlled printing" and always delegate the control flow to the renderer. Simplify the tests by not using a message loop anymore. Followup changes will remove more parts that are not needed anymore. Review URL: http://codereview.chromium.org/19460 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/print_view_manager.cc')
-rw-r--r--chrome/browser/printing/print_view_manager.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 6813a15..436742a 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -254,14 +254,8 @@ void PrintViewManager::OnNotifyPrintJobInitEvent(
owner_.render_view_host()->IsRenderViewLive() &&
(!old_print_params.Equals(print_params_) ||
!event_details.document()->page_count())) {
- // This will generate a DidGetPrintedPagesCount() callback.
- if (!owner_.render_view_host()->GetPrintedPagesCount(print_params_)) {
- NOTREACHED();
- if (inside_inner_message_loop_) {
- MessageLoop::current()->Quit();
- return;
- }
- }
+ // TODO(maruel): Will never happen, this code is about to be deleted.
+ NOTREACHED();
}
// Continue even if owner_.render_view_host() is dead because we may already
@@ -477,10 +471,8 @@ void PrintViewManager::PrintNowInternal() {
if (!print_job_->document() ||
!print_job_->document()->IsComplete()) {
- ViewMsg_PrintPages_Params params;
- params.params = print_params_;
- params.pages = PageRange::GetPages(print_job_->settings().ranges);
- owner_.render_view_host()->PrintPages(params);
+ // TODO(maruel): Will never happen. This code is about to be deleted.
+ NOTREACHED();
}
}