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

Side by Side Diff: printing/pdf_metafile_skia.h

Issue 10560021: Mac printing: Autorotate printed pages so their orientation is the same as the destination page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 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_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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const RECT* rect) const OVERRIDE; 56 const RECT* rect) const OVERRIDE;
57 virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const OVERRIDE; 57 virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const OVERRIDE;
58 virtual HENHMETAFILE emf() const OVERRIDE; 58 virtual HENHMETAFILE emf() const OVERRIDE;
59 #elif defined(OS_MACOSX) 59 #elif defined(OS_MACOSX)
60 virtual bool RenderPage(unsigned int page_number, 60 virtual bool RenderPage(unsigned int page_number,
61 CGContextRef context, 61 CGContextRef context,
62 const CGRect rect, 62 const CGRect rect,
63 bool shrink_to_fit, 63 bool shrink_to_fit,
64 bool stretch_to_fit, 64 bool stretch_to_fit,
65 bool center_horizontally, 65 bool center_horizontally,
66 bool center_vertically) const OVERRIDE; 66 bool center_vertically,
67 bool autorotate) const OVERRIDE;
67 #endif 68 #endif
68 69
69 #if defined(OS_CHROMEOS) 70 #if defined(OS_CHROMEOS)
70 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; 71 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE;
71 #endif // if defined(OS_CHROMEOS) 72 #endif // if defined(OS_CHROMEOS)
72 73
73 // Return a new metafile containing just the current page in draft mode. 74 // Return a new metafile containing just the current page in draft mode.
74 PdfMetafileSkia* GetMetafileForCurrentPage(); 75 PdfMetafileSkia* GetMetafileForCurrentPage();
75 76
76 private: 77 private:
77 scoped_ptr<PdfMetafileSkiaData> data_; 78 scoped_ptr<PdfMetafileSkiaData> data_;
78 79
79 // True when finish page is outstanding for current page. 80 // True when finish page is outstanding for current page.
80 bool page_outstanding_; 81 bool page_outstanding_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); 83 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia);
83 }; 84 };
84 85
85 } // namespace printing 86 } // namespace printing
86 87
87 #endif // PRINTING_PDF_METAFILE_SKIA_H_ 88 #endif // PRINTING_PDF_METAFILE_SKIA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698