summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 21:48:25 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 21:48:25 +0000
commite03877283adbc051136a08fac7cff567d0eb247c (patch)
tree75eaa1ee4e79ff390adcbcdd250857d887f1bb8e /chrome/renderer
parent40df502ac98899a4145e7ed31292cf206c2f7b69 (diff)
downloadchromium_src-e03877283adbc051136a08fac7cff567d0eb247c.zip
chromium_src-e03877283adbc051136a08fac7cff567d0eb247c.tar.gz
chromium_src-e03877283adbc051136a08fac7cff567d0eb247c.tar.bz2
Printing: Rename some variables in the two different PrintPages() to be more consistent.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6352001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/print_web_view_helper.cc6
-rw-r--r--chrome/renderer/print_web_view_helper_linux.cc17
2 files changed, 13 insertions, 10 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index 58af5f6..09d4859f 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -1,9 +1,11 @@
-// Copyright (c) 2010 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.
#include "chrome/renderer/print_web_view_helper.h"
+#include <string>
+
#include "app/l10n_util.h"
#include "base/logging.h"
#include "base/process_util.h"
@@ -262,7 +264,7 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
const gfx::Size& canvas_size = prep_frame_view.GetPrintCanvasSize();
ViewMsg_PrintPage_Params page_params;
- page_params.params = params.params;
+ page_params.params = printParams;
if (params.pages.empty()) {
for (int i = 0; i < page_count; ++i) {
page_params.page_number = i;
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index 270272d..8488073 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -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.
@@ -33,7 +33,8 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
// 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,
node,
frame->view());
@@ -46,20 +47,20 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
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);
}
}
}