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

Side by Side Diff: chrome/browser/printing/print_view_manager_base.cc

Issue 335473002: Guarded shrink setting with ifdefs to make clear where it is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thu 06/12/2014 0:59:45.49 Created 6 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/print_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/printing/print_view_manager_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 TerminatePrintJob(true); 213 TerminatePrintJob(true);
214 web_contents()->Stop(); 214 web_contents()->Stop();
215 return; 215 return;
216 } 216 }
217 } 217 }
218 #endif // OS_WIN && !WIN_PDF_METAFILE_FOR_PRINTING 218 #endif // OS_WIN && !WIN_PDF_METAFILE_FOR_PRINTING
219 219
220 #if !defined(WIN_PDF_METAFILE_FOR_PRINTING) 220 #if !defined(WIN_PDF_METAFILE_FOR_PRINTING)
221 // Update the rendered document. It will send notifications to the listener. 221 // Update the rendered document. It will send notifications to the listener.
222 document->SetPage(params.page_number, 222 document->SetPage(params.page_number,
223 metafile.release(), 223 metafile.release(),
224 params.actual_shrink, 224 #if defined(OS_WIN)
225 params.page_size, 225 params.actual_shrink,
226 params.content_area); 226 #endif // OS_WIN
227 params.page_size,
228 params.content_area);
227 229
228 ShouldQuitFromInnerMessageLoop(); 230 ShouldQuitFromInnerMessageLoop();
229 #else 231 #else
230 if (metafile_must_be_valid) { 232 if (metafile_must_be_valid) {
231 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes( 233 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
232 reinterpret_cast<const unsigned char*>(shared_buf.memory()), 234 reinterpret_cast<const unsigned char*>(shared_buf.memory()),
233 params.data_size); 235 params.data_size);
234 236
235 if (!pdf_to_emf_converter_) 237 if (!pdf_to_emf_converter_)
236 pdf_to_emf_converter_ = PdfToEmfConverter::CreateDefault(); 238 pdf_to_emf_converter_ = PdfToEmfConverter::CreateDefault();
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 scoped_refptr<printing::PrinterQuery> printer_query; 590 scoped_refptr<printing::PrinterQuery> printer_query;
589 printer_query = queue_->PopPrinterQuery(cookie); 591 printer_query = queue_->PopPrinterQuery(cookie);
590 if (!printer_query) 592 if (!printer_query)
591 return; 593 return;
592 BrowserThread::PostTask( 594 BrowserThread::PostTask(
593 BrowserThread::IO, FROM_HERE, 595 BrowserThread::IO, FROM_HERE,
594 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 596 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
595 } 597 }
596 598
597 } // namespace printing 599 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698