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

Side by Side Diff: printing/metafile.h

Issue 23116003: Adds PrintingContext implementation stub for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes some build targets and try bots. Some other nits. Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2012 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_METAFILE_H_ 5 #ifndef PRINTING_METAFILE_H_
6 #define PRINTING_METAFILE_H_ 6 #define PRINTING_METAFILE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "printing/printing_export.h" 10 #include "printing/printing_export.h"
(...skipping 11 matching lines...) Expand all
22 class FilePath; 22 class FilePath;
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class Rect; 26 class Rect;
27 class Size; 27 class Size;
28 } 28 }
29 29
30 class SkDevice; 30 class SkDevice;
31 31
32 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
33 namespace base { 33 namespace base {
34 struct FileDescriptor; 34 struct FileDescriptor;
35 } 35 }
36 #endif 36 #endif
37 37
38 namespace printing { 38 namespace printing {
39 39
40 // This class creates a graphics context that renders into a data stream 40 // This class creates a graphics context that renders into a data stream
41 // (usually PDF or EMF). 41 // (usually PDF or EMF).
42 class PRINTING_EXPORT Metafile { 42 class PRINTING_EXPORT Metafile {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 virtual HENHMETAFILE emf() const = 0; 149 virtual HENHMETAFILE emf() const = 0;
150 #elif defined(OS_MACOSX) 150 #elif defined(OS_MACOSX)
151 // Renders the given page into |rect| in the given context. 151 // Renders the given page into |rect| in the given context.
152 // Pages use a 1-based index. The rendering uses the arguments in 152 // Pages use a 1-based index. The rendering uses the arguments in
153 // |params| to determine scaling, translation, and rotation. 153 // |params| to determine scaling, translation, and rotation.
154 virtual bool RenderPage(unsigned int page_number, 154 virtual bool RenderPage(unsigned int page_number,
155 gfx::NativeDrawingContext context, 155 gfx::NativeDrawingContext context,
156 const CGRect rect, 156 const CGRect rect,
157 const MacRenderPageParams& params) const = 0; 157 const MacRenderPageParams& params) const = 0;
158 #elif defined(OS_CHROMEOS) 158 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
159 // Saves the underlying data to the file associated with fd. This function 159 // Saves the underlying data to the file associated with fd. This function
160 // should ONLY be called after the metafile is closed. 160 // should ONLY be called after the metafile is closed.
161 // Returns true if writing succeeded. 161 // Returns true if writing succeeded.
162 virtual bool SaveToFD(const base::FileDescriptor& fd) const = 0; 162 virtual bool SaveToFD(const base::FileDescriptor& fd) const = 0;
163 #endif // if defined(OS_CHROMEOS) 163 #endif // if defined(OS_CHROMEOS) || defined(OS_ANDROID)
164 }; 164 };
165 165
166 } // namespace printing 166 } // namespace printing
167 167
168 #endif // PRINTING_METAFILE_H_ 168 #endif // PRINTING_METAFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698