Chromium Code Reviews| 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_PDF_METAFILE_SKIA_H_ | 5 #ifndef PRINTING_PDF_METAFILE_SKIA_H_ |
| 6 #define PRINTING_PDF_METAFILE_SKIA_H_ | 6 #define PRINTING_PDF_METAFILE_SKIA_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 bool center_horizontally, | 63 bool center_horizontally, |
| 64 bool center_vertically) const; | 64 bool center_vertically) const; |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #if defined(OS_CHROMEOS) | 67 #if defined(OS_CHROMEOS) |
| 68 virtual bool SaveToFD(const base::FileDescriptor& fd) const; | 68 virtual bool SaveToFD(const base::FileDescriptor& fd) const; |
| 69 #endif // if defined(OS_CHROMEOS) | 69 #endif // if defined(OS_CHROMEOS) |
| 70 | 70 |
| 71 virtual void set_draft(bool draft) const; | 71 virtual void set_draft(bool draft) const; |
| 72 | 72 |
| 73 // Helper function to get the metafile for current page. This is called from | |
|
vandebo (ex-Chrome)
2011/06/29 20:23:45
We can probably give a better description of this
kmadhusu
2011/06/30 06:10:55
Done.
| |
| 74 // the preview workflow. | |
| 75 PdfMetafileSkia* GetMetafileForCurrentPage(); | |
| 76 | |
| 73 private: | 77 private: |
| 74 scoped_ptr<PdfMetafileSkiaData> data_; | 78 scoped_ptr<PdfMetafileSkiaData> data_; |
| 75 | 79 |
| 76 // True when a draft version of metafile is requested. | 80 // True when a draft version of metafile is requested. |
| 77 mutable bool draft_; | 81 mutable bool draft_; |
| 78 | 82 |
| 83 // True when finish page is already called for current page. | |
| 84 mutable bool did_finish_page_; | |
|
vandebo (ex-Chrome)
2011/06/29 20:23:45
Why do we have mutable fields?
kmadhusu
2011/06/30 06:10:55
Removed.
| |
| 85 | |
| 79 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 86 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
| 80 }; | 87 }; |
| 81 | 88 |
| 82 } // namespace printing | 89 } // namespace printing |
| 83 | 90 |
| 84 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 91 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
| OLD | NEW |