OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/lock.h" | 10 #include "base/lock.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 public: | 36 public: |
37 // The cookie shall be unique and has a specific relationship with its | 37 // The cookie shall be unique and has a specific relationship with its |
38 // originating source and settings. | 38 // originating source and settings. |
39 PrintedDocument(const PrintSettings& settings, | 39 PrintedDocument(const PrintSettings& settings, |
40 PrintedPagesSource* source, | 40 PrintedPagesSource* source, |
41 int cookie); | 41 int cookie); |
42 | 42 |
43 // Sets a page's data. 0-based. Takes metafile ownership. | 43 // Sets a page's data. 0-based. Takes metafile ownership. |
44 // Note: locks for a short amount of time. | 44 // Note: locks for a short amount of time. |
45 void SetPage(int page_number, NativeMetafile* metafile, double shrink, | 45 void SetPage(int page_number, NativeMetafile* metafile, double shrink, |
46 const gfx::Size& paper_size, const gfx::Rect& page_rect); | 46 const gfx::Size& paper_size, const gfx::Rect& page_rect, |
| 47 bool has_visible_overlays); |
47 | 48 |
48 // Retrieves a page. If the page is not available right now, it | 49 // Retrieves a page. If the page is not available right now, it |
49 // requests to have this page be rendered and returns false. | 50 // requests to have this page be rendered and returns false. |
50 // Note: locks for a short amount of time. | 51 // Note: locks for a short amount of time. |
51 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page); | 52 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page); |
52 | 53 |
53 // Draws the page in the context. | 54 // Draws the page in the context. |
54 // Note: locks for a short amount of time in debug only. | 55 // Note: locks for a short amount of time in debug only. |
55 void RenderPrintedPage(const PrintedPage& page, | 56 void RenderPrintedPage(const PrintedPage& page, |
56 gfx::NativeDrawingContext context) const; | 57 gfx::NativeDrawingContext context) const; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 191 |
191 // All the immutable members. | 192 // All the immutable members. |
192 const Immutable immutable_; | 193 const Immutable immutable_; |
193 | 194 |
194 DISALLOW_COPY_AND_ASSIGN(PrintedDocument); | 195 DISALLOW_COPY_AND_ASSIGN(PrintedDocument); |
195 }; | 196 }; |
196 | 197 |
197 } // namespace printing | 198 } // namespace printing |
198 | 199 |
199 #endif // PRINTING_PRINTED_DOCUMENT_H_ | 200 #endif // PRINTING_PRINTED_DOCUMENT_H_ |
OLD | NEW |