Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2544)

Unified Diff: chrome/renderer/print_web_view_helper_linux.cc

Issue 8566055: PrintPreview: [Cleanup] Remove unwanted function calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper_linux.cc
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index 6e1ff5cede25f2cb07333b113a622191886054e5..6b6d9e6b43e07ed12894abc92ccb8b7ec177a9cc 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -57,21 +57,17 @@ bool PrintWebViewHelper::RenderPreviewPage(int page_number) {
bool PrintWebViewHelper::PrintPages(const PrintMsg_PrintPages_Params& params,
WebFrame* frame,
- const WebNode& node,
- PrepareFrameAndViewForPrint* prepare) {
+ const WebNode& node) {
printing::NativeMetafile metafile;
if (!metafile.Init())
return false;
- scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view;
- if (!prepare) {
- prep_frame_view.reset(new PrepareFrameAndViewForPrint(params.params, frame,
- node));
- prepare = prep_frame_view.get();
- }
+ PrepareFrameAndViewForPrint prep_frame_view(params.params, frame, node);
int page_count = 0;
- if (!RenderPages(params, frame, node, &page_count, prepare, &metafile))
+ if (!RenderPages(params, frame, node, &page_count, &prep_frame_view,
+ &metafile)) {
return false;
+ }
// Get the size of the resulting metafile.
uint32 buf_size = metafile.GetDataSize();
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698