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

Side by Side Diff: printing/emf_win.h

Issue 599733002: StartPage/EndPage from spooling code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Sep 23 18:18:33 PDT 2014 Created 6 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 | « chrome/service/cloud_print/print_system_win.cc ('k') | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const float& scale_factor) OVERRIDE; 70 const float& scale_factor) OVERRIDE;
71 virtual bool FinishPage() OVERRIDE; 71 virtual bool FinishPage() OVERRIDE;
72 virtual bool FinishDocument() OVERRIDE; 72 virtual bool FinishDocument() OVERRIDE;
73 73
74 virtual uint32 GetDataSize() const OVERRIDE; 74 virtual uint32 GetDataSize() const OVERRIDE;
75 virtual bool GetData(void* buffer, uint32 size) const OVERRIDE; 75 virtual bool GetData(void* buffer, uint32 size) const OVERRIDE;
76 76
77 // Should be passed to Playback to keep the exact same size. 77 // Should be passed to Playback to keep the exact same size.
78 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; 78 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
79 79
80 virtual unsigned int GetPageCount() const OVERRIDE { 80 virtual unsigned int GetPageCount() const OVERRIDE { return 1; }
81 return page_count_;
82 }
83 81
84 virtual HDC context() const OVERRIDE { 82 virtual HDC context() const OVERRIDE {
85 return hdc_; 83 return hdc_;
86 } 84 }
87 85
88 virtual bool Playback(HDC hdc, const RECT* rect) const OVERRIDE; 86 virtual bool Playback(HDC hdc, const RECT* rect) const OVERRIDE;
89 virtual bool SafePlayback(HDC hdc) const OVERRIDE; 87 virtual bool SafePlayback(HDC hdc) const OVERRIDE;
90 88
91 HENHMETAFILE emf() const { return emf_; } 89 HENHMETAFILE emf() const { return emf_; }
92 90
(...skipping 19 matching lines...) Expand all
112 const ENHMETARECORD* record, 110 const ENHMETARECORD* record,
113 int objects_count, 111 int objects_count,
114 LPARAM param); 112 LPARAM param);
115 113
116 // Compiled EMF data handle. 114 // Compiled EMF data handle.
117 HENHMETAFILE emf_; 115 HENHMETAFILE emf_;
118 116
119 // Valid when generating EMF data through a virtual HDC. 117 // Valid when generating EMF data through a virtual HDC.
120 HDC hdc_; 118 HDC hdc_;
121 119
122 int page_count_;
123
124 DISALLOW_COPY_AND_ASSIGN(Emf); 120 DISALLOW_COPY_AND_ASSIGN(Emf);
125 }; 121 };
126 122
127 struct Emf::EnumerationContext { 123 struct Emf::EnumerationContext {
128 EnumerationContext(); 124 EnumerationContext();
129 125
130 HANDLETABLE* handle_table; 126 HANDLETABLE* handle_table;
131 int objects_count; 127 int objects_count;
132 HDC hdc; 128 HDC hdc;
133 const XFORM* base_matrix; 129 const XFORM* base_matrix;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 std::vector<Record> items_; 188 std::vector<Record> items_;
193 189
194 EnumerationContext context_; 190 EnumerationContext context_;
195 191
196 DISALLOW_COPY_AND_ASSIGN(Enumerator); 192 DISALLOW_COPY_AND_ASSIGN(Enumerator);
197 }; 193 };
198 194
199 } // namespace printing 195 } // namespace printing
200 196
201 #endif // PRINTING_EMF_WIN_H_ 197 #endif // PRINTING_EMF_WIN_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | printing/emf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698