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

Side by Side Diff: printing/metafile_skia_wrapper.h

Issue 7799003: Add printing.dll to the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/metafile.h ('k') | printing/page_number.h » ('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_METAFILE_SKIA_WRAPPER_H_ 5 #ifndef PRINTING_METAFILE_SKIA_WRAPPER_H_
6 #define PRINTING_METAFILE_SKIA_WRAPPER_H_ 6 #define PRINTING_METAFILE_SKIA_WRAPPER_H_
7 7
8 #include "printing/printing_export.h"
8 #include "third_party/skia/include/core/SkRefCnt.h" 9 #include "third_party/skia/include/core/SkRefCnt.h"
9 10
10 class SkCanvas; 11 class SkCanvas;
11 12
12 namespace printing { 13 namespace printing {
13 14
14 class Metafile; 15 class Metafile;
15 16
16 // A wrapper class with static methods to set and retrieve a Metafile 17 // A wrapper class with static methods to set and retrieve a Metafile
17 // on an SkCanvas. The ownership of the metafile is not affected and it 18 // on an SkCanvas. The ownership of the metafile is not affected and it
18 // is the caller's responsibility to ensure that the metafile remains valid 19 // is the caller's responsibility to ensure that the metafile remains valid
19 // as long as the canvas. 20 // as long as the canvas.
20 class MetafileSkiaWrapper : public SkRefCnt { 21 class PRINTING_EXPORT MetafileSkiaWrapper : public SkRefCnt {
21 public: 22 public:
22 static void SetMetafileOnCanvas(SkCanvas* canvas, Metafile* metafile); 23 static void SetMetafileOnCanvas(SkCanvas* canvas, Metafile* metafile);
23 24
24 static Metafile* GetMetafileFromCanvas(SkCanvas* canvas); 25 static Metafile* GetMetafileFromCanvas(SkCanvas* canvas);
25 26
26 static void SetDraftMode(SkCanvas* canvas, bool draft_mode); 27 static void SetDraftMode(SkCanvas* canvas, bool draft_mode);
27 28
28 static bool GetDraftMode(SkCanvas* canvas); 29 static bool GetDraftMode(SkCanvas* canvas);
29 30
30 private: 31 private:
31 explicit MetafileSkiaWrapper(Metafile* metafile); 32 explicit MetafileSkiaWrapper(Metafile* metafile);
32 33
33 Metafile* metafile_; 34 Metafile* metafile_;
34 }; 35 };
35 36
36 } // namespace printing 37 } // namespace printing
37 38
38 #endif // PRINTING_METAFILE_SKIA_WRAPPER_H_ 39 #endif // PRINTING_METAFILE_SKIA_WRAPPER_H_
OLDNEW
« no previous file with comments | « printing/metafile.h ('k') | printing/page_number.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698