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

Side by Side Diff: printing/printed_document.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
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_PRINTED_DOCUMENT_H_ 5 #ifndef PRINTING_PRINTED_DOCUMENT_H_
6 #define PRINTING_PRINTED_DOCUMENT_H_ 6 #define PRINTING_PRINTED_DOCUMENT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 17 matching lines...) Expand all
28 class PrintedPage; 28 class PrintedPage;
29 class PrintedPagesSource; 29 class PrintedPagesSource;
30 class PrintingContext; 30 class PrintingContext;
31 31
32 // A collection of rendered pages. The settings are immutable. If the print 32 // A collection of rendered pages. The settings are immutable. If the print
33 // settings are changed, a new PrintedDocument must be created. 33 // settings are changed, a new PrintedDocument must be created.
34 // Warning: May be accessed from many threads at the same time. Only one thread 34 // Warning: May be accessed from many threads at the same time. Only one thread
35 // will have write access. Sensible functions are protected by a lock. 35 // will have write access. Sensible functions are protected by a lock.
36 // Warning: Once a page is loaded, it cannot be replaced. Pages may be discarded 36 // Warning: Once a page is loaded, it cannot be replaced. Pages may be discarded
37 // under low memory conditions. 37 // under low memory conditions.
38 class PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> { 38 class PRINTING_EXPORT PrintedDocument
39 : public base::RefCountedThreadSafe<PrintedDocument> {
39 public: 40 public:
40 // The cookie shall be unique and has a specific relationship with its 41 // The cookie shall be unique and has a specific relationship with its
41 // originating source and settings. 42 // originating source and settings.
42 PrintedDocument(const PrintSettings& settings, 43 PrintedDocument(const PrintSettings& settings,
43 PrintedPagesSource* source, 44 PrintedPagesSource* source,
44 int cookie); 45 int cookie);
45 46
46 // Sets a page's data. 0-based. Takes metafile ownership. 47 // Sets a page's data. 0-based. Takes metafile ownership.
47 // Note: locks for a short amount of time. 48 // Note: locks for a short amount of time.
48 void SetPage(int page_number, Metafile* metafile, double shrink, 49 void SetPage(int page_number, Metafile* metafile, double shrink,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 // All the immutable members. 186 // All the immutable members.
186 const Immutable immutable_; 187 const Immutable immutable_;
187 188
188 DISALLOW_COPY_AND_ASSIGN(PrintedDocument); 189 DISALLOW_COPY_AND_ASSIGN(PrintedDocument);
189 }; 190 };
190 191
191 } // namespace printing 192 } // namespace printing
192 193
193 #endif // PRINTING_PRINTED_DOCUMENT_H_ 194 #endif // PRINTING_PRINTED_DOCUMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698