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

Side by Side Diff: printing/native_metafile_factory.h

Issue 6544028: Create a Factory for NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed NativeMetafileFactory class comments Created 9 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PRINTING_NATIVE_METAFILE_FACTORY_H_
6 #define PRINTING_NATIVE_METAFILE_FACTORY_H_
7
8 #include "base/basictypes.h"
9 #include "printing/native_metafile.h"
10
11 #if defined(OS_WIN)
12 #include "printing/emf_win.h"
vandebo (ex-Chrome) 2011/02/23 02:01:41 indention.
dpapad 2011/02/24 20:56:59 Done.
13 #elif defined(OS_MACOSX)
14 #include "printing/pdf_metafile_mac.h"
15 #elif defined(OS_POSIX)
16 #include "printing/pdf_ps_metafile_cairo.h"
17 #endif
18
19 namespace printing {
20
21 // Various printing contexts will be supported in the future (cairo, skia, emf).
22 // So this class returns the appropriate context depending on the platform and
23 // user preferences.
24 // (Note: For the moment there is only one option per platform.)
25 class NativeMetafileFactory {
26 public:
27
28 // This method takes care of returning a pointer to the appropriate
29 // NativeMetafile object according to the platform.
30 static printing::NativeMetafile* CreateMetafile();
31
32 #if defined(OS_LINUX)
33 static printing::NativeMetafile*
34 CreateMetafileFrom(cairo_t* context);
35 #endif
36
37 private:
38 NativeMetafileFactory();
39 DISALLOW_COPY_AND_ASSIGN(NativeMetafileFactory);
40 };
41
42 } // namespace printing
43
44 #endif /* PRINTING_NATIVE_METAFILE_FACTORY_H_ */
vandebo (ex-Chrome) 2011/02/23 02:01:41 style.
dpapad 2011/02/24 20:56:59 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698