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

Side by Side Diff: printing/printed_document.h

Issue 6673035: Move Start/EndPage() from NewPage/PageDone() to inside the metafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PRINTED_DOCUMENT_H_ 5 #ifndef PRINTING_PRINTED_DOCUMENT_H_
6 #define PRINTING_PRINTED_DOCUMENT_H_ 6 #define PRINTING_PRINTED_DOCUMENT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 bool has_visible_overlays); 50 bool has_visible_overlays);
51 51
52 // Retrieves a page. If the page is not available right now, it 52 // Retrieves a page. If the page is not available right now, it
53 // requests to have this page be rendered and returns false. 53 // requests to have this page be rendered and returns false.
54 // Note: locks for a short amount of time. 54 // Note: locks for a short amount of time.
55 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page); 55 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page);
56 56
57 // Draws the page in the context. 57 // Draws the page in the context.
58 // Note: locks for a short amount of time in debug only. 58 // Note: locks for a short amount of time in debug only.
59 #if defined(OS_WIN) || defined(OS_MACOSX) 59 #if defined(OS_WIN) || defined(OS_MACOSX)
60 void RenderPrintedPage(const PrintedPage& page, 60 bool RenderPrintedPage(const PrintedPage& page,
61 gfx::NativeDrawingContext context) const; 61 gfx::NativeDrawingContext context) const;
62 #elif defined(OS_POSIX) 62 #elif defined(OS_POSIX)
63 void RenderPrintedPage(const PrintedPage& page, 63 bool RenderPrintedPage(const PrintedPage& page,
64 PrintingContext* context) const; 64 PrintingContext* context) const;
65 #endif 65 #endif
66 66
67 // Returns true if all the necessary pages for the settings are already 67 // Returns true if all the necessary pages for the settings are already
68 // rendered. 68 // rendered.
69 // Note: locks while parsing the whole tree. 69 // Note: locks while parsing the whole tree.
70 bool IsComplete() const; 70 bool IsComplete() const;
71 71
72 // Disconnects the PrintedPage source (PrintedPagesSource). It is done when 72 // Disconnects the PrintedPage source (PrintedPagesSource). It is done when
73 // the source is being destroyed. 73 // the source is being destroyed.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // All the immutable members. 213 // All the immutable members.
214 const Immutable immutable_; 214 const Immutable immutable_;
215 215
216 DISALLOW_COPY_AND_ASSIGN(PrintedDocument); 216 DISALLOW_COPY_AND_ASSIGN(PrintedDocument);
217 }; 217 };
218 218
219 } // namespace printing 219 } // namespace printing
220 220
221 #endif // PRINTING_PRINTED_DOCUMENT_H_ 221 #endif // PRINTING_PRINTED_DOCUMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698