Index: chrome/renderer/print_web_view_helper_linux.cc |
=================================================================== |
--- chrome/renderer/print_web_view_helper_linux.cc (revision 71367) |
+++ chrome/renderer/print_web_view_helper_linux.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -31,7 +31,8 @@ |
// webkit::ppapi::PluginInstance::PrintEnd() has a valid canvas/metafile to |
// save the final output to. See pepper_plugin_instance.cc for the whole |
// story. |
- PrepareFrameAndViewForPrint prep_frame_view(params.params, |
+ ViewMsg_Print_Params printParams = params.params; |
+ PrepareFrameAndViewForPrint prep_frame_view(printParams, |
frame, |
frame->view()); |
page_count = prep_frame_view.GetExpectedPageCount(); |
@@ -43,20 +44,20 @@ |
metafile.Init(); |
- ViewMsg_PrintPage_Params print_page_params; |
- print_page_params.params = params.params; |
+ ViewMsg_PrintPage_Params page_params; |
+ page_params.params = printParams; |
const gfx::Size& canvas_size = prep_frame_view.GetPrintCanvasSize(); |
if (params.pages.empty()) { |
for (int i = 0; i < page_count; ++i) { |
- print_page_params.page_number = i; |
+ page_params.page_number = i; |
delete canvas; |
- PrintPage(print_page_params, canvas_size, frame, &metafile, &canvas); |
+ PrintPage(page_params, canvas_size, frame, &metafile, &canvas); |
} |
} else { |
for (size_t i = 0; i < params.pages.size(); ++i) { |
- print_page_params.page_number = params.pages[i]; |
+ page_params.page_number = params.pages[i]; |
delete canvas; |
- PrintPage(print_page_params, canvas_size, frame, &metafile, &canvas); |
+ PrintPage(page_params, canvas_size, frame, &metafile, &canvas); |
} |
} |
} |