summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/print_web_view_helper_linux.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 19:18:05 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 19:18:05 +0000
commitb719142cac87c33ec2d6e99a238b5ecd48f87d68 (patch)
treecb073e88f553db6c3acab1c18c1f9e31793a80b7 /chrome/renderer/print_web_view_helper_linux.cc
parentb119a1e6bdd11040f93245e0b71d654a4883b40a (diff)
downloadchromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.zip
chromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.tar.gz
chromium_src-b719142cac87c33ec2d6e99a238b5ecd48f87d68.tar.bz2
Printing: Implement PrintingContext::UseDefaultSettings for Linux/Cairo.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3389005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper_linux.cc')
-rw-r--r--chrome/renderer/print_web_view_helper_linux.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index a616ee43..53e021a 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -46,42 +46,6 @@ static void FillDefaultPrintParams(ViewMsg_Print_Params* params) {
params->desired_dpi = params->dpi;
}
-void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) {
- // If still not finished with earlier print request simply ignore.
- if (IsPrinting())
- return;
-
- ViewMsg_Print_Params default_settings;
- FillDefaultPrintParams(&default_settings);
- double content_width, content_height;
-
- {
- // PrepareFrameAndViewForPrint instance must be destructed before calling
- // PrintPages where another instance is created.
- PrepareFrameAndViewForPrint prepare(default_settings,
- frame,
- frame->view());
- GetPageSizeAndMarginsInPoints(frame, 0, default_settings,
- &content_width, &content_height,
- NULL, NULL, NULL, NULL);
- }
-
- default_settings.dpi = printing::kPointsPerInch;
- default_settings.min_shrink = 1.25;
- default_settings.max_shrink = 2.0;
- default_settings.desired_dpi = printing::kPointsPerInch;
- default_settings.document_cookie = 0;
- default_settings.selection_only = false;
-
- default_settings.printable_size = gfx::Size(
- static_cast<int>(content_width), static_cast<int>(content_height));
-
- ViewMsg_PrintPages_Params print_settings;
- print_settings.params = default_settings;
-
- PrintPages(print_settings, frame);
-}
-
void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
WebFrame* frame) {
PrepareFrameAndViewForPrint prep_frame_view(params.params,