OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/emf_win.h" | 5 #include "printing/emf_win.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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "gfx/codec/jpeg_codec.h" | |
13 #include "gfx/codec/png_codec.h" | |
14 #include "gfx/gdi_util.h" | |
15 #include "gfx/rect.h" | |
16 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "ui/gfx/codec/jpeg_codec.h" |
| 14 #include "ui/gfx/codec/png_codec.h" |
| 15 #include "ui/gfx/gdi_util.h" |
| 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 const int kCustomGdiCommentSignature = 0xdeadbabe; | 19 const int kCustomGdiCommentSignature = 0xdeadbabe; |
20 struct PageBreakRecord { | 20 struct PageBreakRecord { |
21 int signature; | 21 int signature; |
22 enum PageBreakType { | 22 enum PageBreakType { |
23 START_PAGE, | 23 START_PAGE, |
24 END_PAGE, | 24 END_PAGE, |
25 } type; | 25 } type; |
26 explicit PageBreakRecord(PageBreakType type_in) | 26 explicit PageBreakRecord(PageBreakType type_in) |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 } else { | 467 } else { |
468 DCHECK_EQ(emf.context_.handle_table, handle_table); | 468 DCHECK_EQ(emf.context_.handle_table, handle_table); |
469 DCHECK_EQ(emf.context_.objects_count, objects_count); | 469 DCHECK_EQ(emf.context_.objects_count, objects_count); |
470 DCHECK_EQ(emf.context_.hdc, hdc); | 470 DCHECK_EQ(emf.context_.hdc, hdc); |
471 } | 471 } |
472 emf.items_.push_back(Record(&emf.context_, record)); | 472 emf.items_.push_back(Record(&emf.context_, record)); |
473 return 1; | 473 return 1; |
474 } | 474 } |
475 | 475 |
476 } // namespace printing | 476 } // namespace printing |
OLD | NEW |