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

Side by Side Diff: printing/pdf_metafile_cg_mac.cc

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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
« no previous file with comments | « printing/image.h ('k') | printing/pdf_metafile_skia.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "printing/pdf_metafile_cg_mac.h" 5 #include "printing/pdf_metafile_cg_mac.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/mac/mac_util.h" 12 #include "base/mac/mac_util.h"
13 #include "base/mac/scoped_cftyperef.h" 13 #include "base/mac/scoped_cftyperef.h"
14 #include "base/strings/sys_string_conversions.h" 14 #include "base/strings/sys_string_conversions.h"
15 #include "base/threading/thread_local.h" 15 #include "base/threading/thread_local.h"
16 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/size.h" 17 #include "ui/gfx/geometry/size.h"
18 18
19 using base::ScopedCFTypeRef; 19 using base::ScopedCFTypeRef;
20 20
21 namespace { 21 namespace {
22 22
23 // What is up with this ugly hack? <http://crbug.com/64641>, that's what. 23 // What is up with this ugly hack? <http://crbug.com/64641>, that's what.
24 // The bug: Printing certain PDFs crashes. The cause: When printing, the 24 // The bug: Printing certain PDFs crashes. The cause: When printing, the
25 // renderer process assembles pages one at a time, in PDF format, to send to the 25 // renderer process assembles pages one at a time, in PDF format, to send to the
26 // browser process. When printing a PDF, the PDF plugin returns output in PDF 26 // browser process. When printing a PDF, the PDF plugin returns output in PDF
27 // format. There is a bug in 10.5 and 10.6 (<rdar://9018916>, 27 // format. There is a bug in 10.5 and 10.6 (<rdar://9018916>,
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 if (!pdf_doc_.get()) { 333 if (!pdf_doc_.get()) {
334 ScopedCFTypeRef<CGDataProviderRef> pdf_data_provider( 334 ScopedCFTypeRef<CGDataProviderRef> pdf_data_provider(
335 CGDataProviderCreateWithCFData(pdf_data_)); 335 CGDataProviderCreateWithCFData(pdf_data_));
336 pdf_doc_.reset(CGPDFDocumentCreateWithProvider(pdf_data_provider)); 336 pdf_doc_.reset(CGPDFDocumentCreateWithProvider(pdf_data_provider));
337 } 337 }
338 return pdf_doc_.get(); 338 return pdf_doc_.get();
339 } 339 }
340 340
341 } // namespace printing 341 } // namespace printing
OLDNEW
« no previous file with comments | « printing/image.h ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698