| 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 #ifndef PRINTING_EMF_WIN_H_ | 5 #ifndef PRINTING_EMF_WIN_H_ |
| 6 #define PRINTING_EMF_WIN_H_ | 6 #define PRINTING_EMF_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 class Record; | 36 class Record; |
| 37 class Enumerator; | 37 class Enumerator; |
| 38 struct EnumerationContext; | 38 struct EnumerationContext; |
| 39 | 39 |
| 40 // Generates a virtual HDC that will record every GDI commands and compile | 40 // Generates a virtual HDC that will record every GDI commands and compile |
| 41 // it in a EMF data stream. | 41 // it in a EMF data stream. |
| 42 Emf(); | 42 Emf(); |
| 43 virtual ~Emf(); | 43 virtual ~Emf(); |
| 44 | 44 |
| 45 // Closes metafile. |
| 46 void Close(); |
| 47 |
| 45 // Generates a new metafile that will record every GDI command, and will | 48 // Generates a new metafile that will record every GDI command, and will |
| 46 // be saved to |metafile_path|. | 49 // be saved to |metafile_path|. |
| 47 virtual bool InitToFile(const base::FilePath& metafile_path); | 50 virtual bool InitToFile(const base::FilePath& metafile_path); |
| 48 | 51 |
| 49 // Initializes the Emf with the data in |metafile_path|. | 52 // Initializes the Emf with the data in |metafile_path|. |
| 50 virtual bool InitFromFile(const base::FilePath& metafile_path); | 53 virtual bool InitFromFile(const base::FilePath& metafile_path); |
| 51 | 54 |
| 52 // Metafile methods. | 55 // Metafile methods. |
| 53 virtual bool Init() OVERRIDE; | 56 virtual bool Init() OVERRIDE; |
| 54 virtual bool InitFromData(const void* src_buffer, | 57 virtual bool InitFromData(const void* src_buffer, |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 std::vector<Record> items_; | 201 std::vector<Record> items_; |
| 199 | 202 |
| 200 EnumerationContext context_; | 203 EnumerationContext context_; |
| 201 | 204 |
| 202 DISALLOW_COPY_AND_ASSIGN(Enumerator); | 205 DISALLOW_COPY_AND_ASSIGN(Enumerator); |
| 203 }; | 206 }; |
| 204 | 207 |
| 205 } // namespace printing | 208 } // namespace printing |
| 206 | 209 |
| 207 #endif // PRINTING_EMF_WIN_H_ | 210 #endif // PRINTING_EMF_WIN_H_ |
| OLD | NEW |