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

Side by Side Diff: printing/pdf_metafile_cg_mac.cc

Issue 7799003: Add printing.dll to the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « printing/pdf_metafile_cg_mac.h ('k') | printing/pdf_metafile_skia.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 thread_pdf_docs_owned_(false) { 45 thread_pdf_docs_owned_(false) {
46 if (!thread_pdf_docs.Get() && base::mac::IsOSSnowLeopardOrEarlier()) { 46 if (!thread_pdf_docs.Get() && base::mac::IsOSSnowLeopardOrEarlier()) {
47 thread_pdf_docs_owned_ = true; 47 thread_pdf_docs_owned_ = true;
48 thread_pdf_docs.Set(CFSetCreateMutable(kCFAllocatorDefault, 48 thread_pdf_docs.Set(CFSetCreateMutable(kCFAllocatorDefault,
49 0, 49 0,
50 &kCFTypeSetCallBacks)); 50 &kCFTypeSetCallBacks));
51 } 51 }
52 } 52 }
53 53
54 PdfMetafileCg::~PdfMetafileCg() { 54 PdfMetafileCg::~PdfMetafileCg() {
55 DCHECK(CalledOnValidThread()); 55 DCHECK(thread_checker_.CalledOnValidThread());
56 if (pdf_doc_ && thread_pdf_docs.Get()) { 56 if (pdf_doc_ && thread_pdf_docs.Get()) {
57 // Transfer ownership to the pool. 57 // Transfer ownership to the pool.
58 CFSetAddValue(thread_pdf_docs.Get(), pdf_doc_); 58 CFSetAddValue(thread_pdf_docs.Get(), pdf_doc_);
59 } 59 }
60 60
61 if (thread_pdf_docs_owned_) { 61 if (thread_pdf_docs_owned_) {
62 CFRelease(thread_pdf_docs.Get()); 62 CFRelease(thread_pdf_docs.Get());
63 thread_pdf_docs.Set(NULL); 63 thread_pdf_docs.Set(NULL);
64 } 64 }
65 } 65 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 if (!pdf_doc_.get()) { 292 if (!pdf_doc_.get()) {
293 ScopedCFTypeRef<CGDataProviderRef> pdf_data_provider( 293 ScopedCFTypeRef<CGDataProviderRef> pdf_data_provider(
294 CGDataProviderCreateWithCFData(pdf_data_)); 294 CGDataProviderCreateWithCFData(pdf_data_));
295 pdf_doc_.reset(CGPDFDocumentCreateWithProvider(pdf_data_provider)); 295 pdf_doc_.reset(CGPDFDocumentCreateWithProvider(pdf_data_provider));
296 } 296 }
297 return pdf_doc_.get(); 297 return pdf_doc_.get();
298 } 298 }
299 299
300 } // namespace printing 300 } // namespace printing
OLDNEW
« no previous file with comments | « printing/pdf_metafile_cg_mac.h ('k') | printing/pdf_metafile_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698