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/containers/hash_tables.h" |
7 #include "base/file_descriptor_posix.h" | 8 #include "base/file_descriptor_posix.h" |
8 #include "base/file_util.h" | 9 #include "base/file_util.h" |
9 #include "base/hash_tables.h" | |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/posix/eintr_wrapper.h" | 11 #include "base/posix/eintr_wrapper.h" |
12 #include "base/safe_numerics.h" | 12 #include "base/safe_numerics.h" |
13 #include "skia/ext/refptr.h" | 13 #include "skia/ext/refptr.h" |
14 #include "skia/ext/vector_platform_device_skia.h" | 14 #include "skia/ext/vector_platform_device_skia.h" |
15 #include "third_party/skia/include/core/SkData.h" | 15 #include "third_party/skia/include/core/SkData.h" |
16 #include "third_party/skia/include/core/SkRefCnt.h" | 16 #include "third_party/skia/include/core/SkRefCnt.h" |
17 #include "third_party/skia/include/core/SkScalar.h" | 17 #include "third_party/skia/include/core/SkScalar.h" |
18 #include "third_party/skia/include/core/SkStream.h" | 18 #include "third_party/skia/include/core/SkStream.h" |
19 #include "third_party/skia/include/core/SkTypeface.h" | 19 #include "third_party/skia/include/core/SkTypeface.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 if (data->size() == 0) | 239 if (data->size() == 0) |
240 return NULL; | 240 return NULL; |
241 | 241 |
242 PdfMetafileSkia* metafile = new PdfMetafileSkia; | 242 PdfMetafileSkia* metafile = new PdfMetafileSkia; |
243 metafile->InitFromData(data->bytes(), | 243 metafile->InitFromData(data->bytes(), |
244 base::checked_numeric_cast<uint32>(data->size())); | 244 base::checked_numeric_cast<uint32>(data->size())); |
245 return metafile; | 245 return metafile; |
246 } | 246 } |
247 | 247 |
248 } // namespace printing | 248 } // namespace printing |
OLD | NEW |