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

Side by Side Diff: printing/native_metafile_factory.h

Issue 6696076: Adding CreateFromData to NativeMetafileFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 9 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
« no previous file with comments | « printing/image.cc ('k') | printing/native_metafile_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_NATIVE_METAFILE_FACTORY_H_ 5 #ifndef PRINTING_NATIVE_METAFILE_FACTORY_H_
6 #define PRINTING_NATIVE_METAFILE_FACTORY_H_ 6 #define PRINTING_NATIVE_METAFILE_FACTORY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "printing/native_metafile.h" 9 #include "printing/native_metafile.h"
10 10
11 namespace printing { 11 namespace printing {
12 12
13 // Various printing contexts will be supported in the future (cairo, skia, emf). 13 // Various printing contexts will be supported in the future (cairo, skia, emf).
14 // So this class returns the appropriate context depending on the platform and 14 // So this class returns the appropriate context depending on the platform and
15 // user preferences. 15 // user preferences.
16 // (Note: For the moment there is only one option per platform.) 16 // (Note: For the moment there is only one option per platform.)
17 class NativeMetafileFactory { 17 class NativeMetafileFactory {
18 public: 18 public:
19 // This method returns a pointer to the appropriate NativeMetafile object 19 // This method returns a pointer to the appropriate NativeMetafile object
20 // according to the platform. 20 // according to the platform. The metafile is already initialized by invoking
21 // Init() on it. NULL is returned if Init() fails.
21 static printing::NativeMetafile* Create(); 22 static printing::NativeMetafile* Create();
22 23
24 // This method returns a pointer to the appropriate NativeMetafile object
25 // according to the platform. The metafile is already initialized by invoking
26 // InitFromData(src_buffer,_buffer_size) on it. NULL is returned if
27 // InitiFromData() fails.
28 static printing::NativeMetafile* CreateFromData(const void* src_buffer,
29 uint32 src_buffer_size);
30
23 private: 31 private:
24 NativeMetafileFactory(); 32 NativeMetafileFactory();
33
34 // Retrieves a new uninitialized metafile.
35 static NativeMetafile* CreateNewMetafile();
36
25 DISALLOW_COPY_AND_ASSIGN(NativeMetafileFactory); 37 DISALLOW_COPY_AND_ASSIGN(NativeMetafileFactory);
26 }; 38 };
27 39
28 } // namespace printing 40 } // namespace printing
29 41
30 #endif // PRINTING_NATIVE_METAFILE_FACTORY_H_ 42 #endif // PRINTING_NATIVE_METAFILE_FACTORY_H_
OLDNEW
« no previous file with comments | « printing/image.cc ('k') | printing/native_metafile_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698