Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: printing/emf_win.h

Issue 1343593002: Cleanup code in printing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | printing/emf_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Generates a new metafile that will record every GDI command, and will 49 // Generates a new metafile that will record every GDI command, and will
50 // be saved to |metafile_path|. 50 // be saved to |metafile_path|.
51 bool InitToFile(const base::FilePath& metafile_path); 51 bool InitToFile(const base::FilePath& metafile_path);
52 52
53 // Initializes the Emf with the data in |metafile_path|. 53 // Initializes the Emf with the data in |metafile_path|.
54 bool InitFromFile(const base::FilePath& metafile_path); 54 bool InitFromFile(const base::FilePath& metafile_path);
55 55
56 // Metafile methods. 56 // Metafile methods.
57 bool Init() override; 57 bool Init() override;
58 bool InitFromData(const void* src_buffer, 58 bool InitFromData(const void* src_buffer,
59 uint32 src_buffer_size) override; 59 uint32_t src_buffer_size) override;
60 60
61 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls 61 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls
62 // (since StartPage and EndPage do not work in a metafile DC). Only valid 62 // (since StartPage and EndPage do not work in a metafile DC). Only valid
63 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are 63 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are
64 // ignored. 64 // ignored.
65 bool StartPage(const gfx::Size& page_size, 65 bool StartPage(const gfx::Size& page_size,
66 const gfx::Rect& content_area, 66 const gfx::Rect& content_area,
67 const float& scale_factor) override; 67 const float& scale_factor) override;
68 bool FinishPage() override; 68 bool FinishPage() override;
69 bool FinishDocument() override; 69 bool FinishDocument() override;
70 70
71 uint32 GetDataSize() const override; 71 uint32_t GetDataSize() const override;
72 bool GetData(void* buffer, uint32 size) const override; 72 bool GetData(void* buffer, uint32_t size) const override;
73 73
74 // Should be passed to Playback to keep the exact same size. 74 // Should be passed to Playback to keep the exact same size.
75 gfx::Rect GetPageBounds(unsigned int page_number) const override; 75 gfx::Rect GetPageBounds(unsigned int page_number) const override;
76 76
77 unsigned int GetPageCount() const override; 77 unsigned int GetPageCount() const override;
78 HDC context() const override; 78 HDC context() const override;
79 bool Playback(HDC hdc, const RECT* rect) const override; 79 bool Playback(HDC hdc, const RECT* rect) const override;
80 bool SafePlayback(HDC hdc) const override; 80 bool SafePlayback(HDC hdc) const override;
81 81
82 HENHMETAFILE emf() const { return emf_; } 82 HENHMETAFILE emf() const { return emf_; }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 std::vector<Record> items_; 183 std::vector<Record> items_;
184 184
185 EnumerationContext context_; 185 EnumerationContext context_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(Enumerator); 187 DISALLOW_COPY_AND_ASSIGN(Enumerator);
188 }; 188 };
189 189
190 } // namespace printing 190 } // namespace printing
191 191
192 #endif // PRINTING_EMF_WIN_H_ 192 #endif // PRINTING_EMF_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | printing/emf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698