| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |