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

Side by Side Diff: printing/metafile_factory.cc

Issue 6544028: Create a Factory for NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed styling issues (naming, 80cols) 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 #include "printing/metafile_factory.h"
6
7 namespace printing {
8
9 /* static */
vandebo (ex-Chrome) 2011/02/22 22:18:16 // static
dpapad 2011/02/23 00:44:39 Done.
10 printing::NativeMetafile* MetafileFactory::GetMetafile(){
11
12 #if defined(OS_WIN)
vandebo (ex-Chrome) 2011/02/22 22:18:16 These can all be of the form: return new printing:
dpapad 2011/02/23 00:44:39 Done.
13 printing::NativeMetafile* metafile_ptr = new printing::Emf;
14 #elif defined(OS_MACOSX)
15 printing::NativeMetafile* metafile_ptr = new printing::PdfMetafile;
16 #elif defined(OS_POSIX)
17 printing::NativeMetafile* metafile_ptr = new printing::PdfPsMetafile;
18 #endif
19
20 return metafile_ptr;
21
Avi (use Gerrit) 2011/02/22 19:00:07 unnecessary line
dpapad 2011/02/22 19:29:10 Done.
22 }
23
24 #if defined(OS_LINUX)
25 /* static */
26 printing::NativeMetafile* MetafileFactory::GetMetafileFrom(cairo_t* context){
27 printing::NativeMetafile* metafile_ptr =
28 printing::PdfPsMetafile::FromCairoContext(context);
29 return metafile_ptr;
30 }
31 #endif
32
33 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698