OLD | NEW |
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_PRINTING_CONTEXT_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_H_ |
6 #define PRINTING_PRINTING_CONTEXT_H_ | 6 #define PRINTING_PRINTING_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Initializes with predefined settings. | 65 // Initializes with predefined settings. |
66 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | 66 virtual Result InitWithSettings(const PrintSettings& settings) = 0; |
67 | 67 |
68 // Does platform specific setup of the printer before the printing. Signal the | 68 // Does platform specific setup of the printer before the printing. Signal the |
69 // printer that a document is about to be spooled. | 69 // printer that a document is about to be spooled. |
70 // Warning: This function enters a message loop. That may cause side effects | 70 // Warning: This function enters a message loop. That may cause side effects |
71 // like IPC message processing! Some printers have side-effects on this call | 71 // like IPC message processing! Some printers have side-effects on this call |
72 // like virtual printers that ask the user for the path of the saved document; | 72 // like virtual printers that ask the user for the path of the saved document; |
73 // for example a PDF printer. | 73 // for example a PDF printer. |
74 virtual Result NewDocument(const string16& document_name) = 0; | 74 virtual Result NewDocument(const base::string16& document_name) = 0; |
75 | 75 |
76 // Starts a new page. | 76 // Starts a new page. |
77 virtual Result NewPage() = 0; | 77 virtual Result NewPage() = 0; |
78 | 78 |
79 // Closes the printed page. | 79 // Closes the printed page. |
80 virtual Result PageDone() = 0; | 80 virtual Result PageDone() = 0; |
81 | 81 |
82 // Closes the printing job. After this call the object is ready to start a new | 82 // Closes the printing job. After this call the object is ready to start a new |
83 // document. | 83 // document. |
84 virtual Result DocumentDone() = 0; | 84 virtual Result DocumentDone() = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Is a print job being done. | 122 // Is a print job being done. |
123 volatile bool in_print_job_; | 123 volatile bool in_print_job_; |
124 | 124 |
125 // Did the user cancel the print job. | 125 // Did the user cancel the print job. |
126 volatile bool abort_printing_; | 126 volatile bool abort_printing_; |
127 | 127 |
128 // The application locale. | 128 // The application locale. |
129 std::string app_locale_; | 129 std::string app_locale_; |
130 | 130 |
| 131 private: |
131 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 132 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace printing | 135 } // namespace printing |
135 | 136 |
136 #endif // PRINTING_PRINTING_CONTEXT_H_ | 137 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |