OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/common/gfx/emf.h" | 5 #include "printing/emf_win.h" |
6 | 6 |
7 #include "base/gfx/rect.h" | 7 #include "base/gfx/rect.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 namespace gfx { | 10 namespace printing { |
11 | 11 |
12 Emf::Emf() : emf_(NULL), hdc_(NULL) { | 12 Emf::Emf() : emf_(NULL), hdc_(NULL) { |
13 } | 13 } |
14 | 14 |
15 Emf::~Emf() { | 15 Emf::~Emf() { |
16 CloseEmf(); | 16 CloseEmf(); |
17 DCHECK(!emf_ && !hdc_); | 17 DCHECK(!emf_ && !hdc_); |
18 } | 18 } |
19 | 19 |
20 bool Emf::CreateDc(HDC sibling, const RECT* rect) { | 20 bool Emf::CreateDc(HDC sibling, const RECT* rect) { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 emf.context_.hdc = hdc; | 307 emf.context_.hdc = hdc; |
308 } else { | 308 } else { |
309 DCHECK_EQ(emf.context_.handle_table, handle_table); | 309 DCHECK_EQ(emf.context_.handle_table, handle_table); |
310 DCHECK_EQ(emf.context_.objects_count, objects_count); | 310 DCHECK_EQ(emf.context_.objects_count, objects_count); |
311 DCHECK_EQ(emf.context_.hdc, hdc); | 311 DCHECK_EQ(emf.context_.hdc, hdc); |
312 } | 312 } |
313 emf.items_.push_back(Record(&emf.context_, record)); | 313 emf.items_.push_back(Record(&emf.context_, record)); |
314 return 1; | 314 return 1; |
315 } | 315 } |
316 | 316 |
317 } // namespace gfx | 317 } // namespace printing |
OLD | NEW |