| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Generates a new metafile that will record every GDI command, and will | 51 // Generates a new metafile that will record every GDI command, and will |
| 52 // be saved to |metafile_path|. | 52 // be saved to |metafile_path|. |
| 53 bool InitToFile(const base::FilePath& metafile_path); | 53 bool InitToFile(const base::FilePath& metafile_path); |
| 54 | 54 |
| 55 // Initializes the Emf with the data in |metafile_path|. | 55 // Initializes the Emf with the data in |metafile_path|. |
| 56 bool InitFromFile(const base::FilePath& metafile_path); | 56 bool InitFromFile(const base::FilePath& metafile_path); |
| 57 | 57 |
| 58 // Metafile methods. | 58 // Metafile methods. |
| 59 bool Init() override; | 59 bool Init() override; |
| 60 bool InitFromData(const void* src_buffer, | 60 bool InitFromData(const void* src_buffer, size_t src_buffer_size) override; |
| 61 uint32_t src_buffer_size) override; | |
| 62 | 61 |
| 63 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls | 62 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls |
| 64 // (since StartPage and EndPage do not work in a metafile DC). Only valid | 63 // (since StartPage and EndPage do not work in a metafile DC). Only valid |
| 65 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are | 64 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are |
| 66 // ignored. | 65 // ignored. |
| 67 void StartPage(const gfx::Size& page_size, | 66 void StartPage(const gfx::Size& page_size, |
| 68 const gfx::Rect& content_area, | 67 const gfx::Rect& content_area, |
| 69 const float& scale_factor) override; | 68 const float& scale_factor) override; |
| 70 bool FinishPage() override; | 69 bool FinishPage() override; |
| 71 bool FinishDocument() override; | 70 bool FinishDocument() override; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 std::vector<Record> items_; | 184 std::vector<Record> items_; |
| 186 | 185 |
| 187 EnumerationContext context_; | 186 EnumerationContext context_; |
| 188 | 187 |
| 189 DISALLOW_COPY_AND_ASSIGN(Enumerator); | 188 DISALLOW_COPY_AND_ASSIGN(Enumerator); |
| 190 }; | 189 }; |
| 191 | 190 |
| 192 } // namespace printing | 191 } // namespace printing |
| 193 | 192 |
| 194 #endif // PRINTING_EMF_WIN_H_ | 193 #endif // PRINTING_EMF_WIN_H_ |
| OLD | NEW |