OLD | NEW |
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_skia.h" | 5 #include "printing/pdf_metafile_skia.h" |
6 | 6 |
7 #include "base/eintr_wrapper.h" | |
8 #include "base/file_descriptor_posix.h" | 7 #include "base/file_descriptor_posix.h" |
9 #include "base/file_util.h" | 8 #include "base/file_util.h" |
10 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
11 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/posix/eintr_wrapper.h" |
12 #include "skia/ext/vector_platform_device_skia.h" | 12 #include "skia/ext/vector_platform_device_skia.h" |
13 #include "third_party/skia/include/core/SkData.h" | 13 #include "third_party/skia/include/core/SkData.h" |
14 #include "third_party/skia/include/core/SkRefCnt.h" | 14 #include "third_party/skia/include/core/SkRefCnt.h" |
15 #include "third_party/skia/include/core/SkScalar.h" | 15 #include "third_party/skia/include/core/SkScalar.h" |
16 #include "third_party/skia/include/core/SkStream.h" | 16 #include "third_party/skia/include/core/SkStream.h" |
17 #include "third_party/skia/include/core/SkTypeface.h" | 17 #include "third_party/skia/include/core/SkTypeface.h" |
18 #include "third_party/skia/include/pdf/SkPDFDevice.h" | 18 #include "third_party/skia/include/pdf/SkPDFDevice.h" |
19 #include "third_party/skia/include/pdf/SkPDFDocument.h" | 19 #include "third_party/skia/include/pdf/SkPDFDocument.h" |
20 #include "ui/gfx/point.h" | 20 #include "ui/gfx/point.h" |
21 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 SkAutoDataUnref data(pdf_stream.copyToData()); | 236 SkAutoDataUnref data(pdf_stream.copyToData()); |
237 if (data->size() == 0) | 237 if (data->size() == 0) |
238 return NULL; | 238 return NULL; |
239 | 239 |
240 PdfMetafileSkia* metafile = new PdfMetafileSkia; | 240 PdfMetafileSkia* metafile = new PdfMetafileSkia; |
241 metafile->InitFromData(data->bytes(), data->size()); | 241 metafile->InitFromData(data->bytes(), data->size()); |
242 return metafile; | 242 return metafile; |
243 } | 243 } |
244 | 244 |
245 } // namespace printing | 245 } // namespace printing |
OLD | NEW |