summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/print_web_view_helper.h
diff options
context:
space:
mode:
authoraayushkumar@chromium.org <aayushkumar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 21:12:02 +0000
committeraayushkumar@chromium.org <aayushkumar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 21:12:02 +0000
commit9d0d357eb0baf6be8ed51c7de7bc132ab64c10d1 (patch)
treee4b09b31ac5b8013c1fdcf0071089fe667751514 /chrome/renderer/print_web_view_helper.h
parentb0ff4e7c000ef7974e2b316388b4416d2ee59007 (diff)
downloadchromium_src-9d0d357eb0baf6be8ed51c7de7bc132ab64c10d1.zip
chromium_src-9d0d357eb0baf6be8ed51c7de7bc132ab64c10d1.tar.gz
chromium_src-9d0d357eb0baf6be8ed51c7de7bc132ab64c10d1.tar.bz2
Added a struct to hold page sizes and margins.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7492031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.h')
-rw-r--r--chrome/renderer/print_web_view_helper.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h
index 31e4f04..4bae6dc 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -66,6 +66,16 @@ class PrepareFrameAndViewForPrint {
DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint);
};
+// Struct that holds margin and content area information of a page.
+typedef struct PageSizeMargins {
+ double content_width;
+ double content_height;
+ double margin_top;
+ double margin_right;
+ double margin_bottom;
+ double margin_left;
+} PageSizeMargins;
+
// PrintWebViewHelper handles most of the printing grunt work for RenderView.
// We plan on making print asynchronous and that will require copying the DOM
// of the document and creating a new WebView with the contents.
@@ -222,12 +232,7 @@ class PrintWebViewHelper : public RenderViewObserver,
WebKit::WebFrame* frame,
int page_index,
const PrintMsg_Print_Params& default_params,
- double* content_width_in_points,
- double* content_height_in_points,
- double* margin_top_in_points,
- double* margin_right_in_points,
- double* margin_bottom_in_points,
- double* margin_left_in_points);
+ PageSizeMargins* page_layout_in_points);
void UpdatePrintableSizeInPrintParameters(WebKit::WebFrame* frame,
WebKit::WebNode* node,