OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_PRINTING_PRINTED_DOCUMENT_H__ | 5 #ifndef PRINTING_PRINTED_DOCUMENT_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINTED_DOCUMENT_H__ | 6 #define PRINTING_PRINTED_DOCUMENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/lock.h" | 10 #include "base/lock.h" |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/printing/print_settings.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "printing/print_settings.h" |
14 #include "printing/native_metafile.h" | 15 #include "printing/native_metafile.h" |
15 #include "googleurl/src/gurl.h" | |
16 | 16 |
17 class MessageLoop; | 17 class MessageLoop; |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 class Font; | 20 class Font; |
21 } | 21 } |
22 | 22 |
23 namespace printing { | 23 namespace printing { |
24 | 24 |
25 class PrintedPage; | 25 class PrintedPage; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const int cookie() const { return immutable_.cookie_; } | 97 const int cookie() const { return immutable_.cookie_; } |
98 | 98 |
99 // Sets a path where to dump printing output files for debugging. If never set | 99 // Sets a path where to dump printing output files for debugging. If never set |
100 // no files are generated. | 100 // no files are generated. |
101 static void set_debug_dump_path(const std::wstring& debug_dump_path); | 101 static void set_debug_dump_path(const std::wstring& debug_dump_path); |
102 | 102 |
103 static const std::wstring& debug_dump_path(); | 103 static const std::wstring& debug_dump_path(); |
104 | 104 |
105 private: | 105 private: |
106 // Array of data for each print previewed page. | 106 // Array of data for each print previewed page. |
107 typedef std::map<int, scoped_refptr<PrintedPage>> PrintedPages; | 107 typedef std::map<int, scoped_refptr<PrintedPage> > PrintedPages; |
108 | 108 |
109 // Contains all the mutable stuff. All this stuff MUST be accessed with the | 109 // Contains all the mutable stuff. All this stuff MUST be accessed with the |
110 // lock held. | 110 // lock held. |
111 struct Mutable { | 111 struct Mutable { |
112 Mutable(PrintedPagesSource* source); | 112 Mutable(PrintedPagesSource* source); |
113 | 113 |
114 // Source that generates the PrintedPage's (i.e. a TabContents). It will be | 114 // Source that generates the PrintedPage's (i.e. a TabContents). It will be |
115 // set back to NULL if the source is deleted before this object. | 115 // set back to NULL if the source is deleted before this object. |
116 PrintedPagesSource* source_; | 116 PrintedPagesSource* source_; |
117 | 117 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 Mutable mutable_; | 182 Mutable mutable_; |
183 | 183 |
184 // All the immutable members. | 184 // All the immutable members. |
185 const Immutable immutable_; | 185 const Immutable immutable_; |
186 | 186 |
187 DISALLOW_EVIL_CONSTRUCTORS(PrintedDocument); | 187 DISALLOW_EVIL_CONSTRUCTORS(PrintedDocument); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace printing | 190 } // namespace printing |
191 | 191 |
192 #endif // CHROME_BROWSER_PRINTING_PRINTED_DOCUMENT_H__ | 192 #endif // PRINTING_PRINTED_DOCUMENT_H_ |
OLD | NEW |