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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // |external_preview| is true if pdf is going to be opened in external | 78 // |external_preview| is true if pdf is going to be opened in external |
79 // preview. Used by MacOS only now to open Preview.app. | 79 // preview. Used by MacOS only now to open Preview.app. |
80 virtual Result UpdatePrinterSettings(bool external_preview, | 80 virtual Result UpdatePrinterSettings(bool external_preview, |
81 bool show_system_dialog, | 81 bool show_system_dialog, |
82 int page_count) = 0; | 82 int page_count) = 0; |
83 | 83 |
84 // Updates Print Settings. |job_settings| contains all print job | 84 // Updates Print Settings. |job_settings| contains all print job |
85 // settings information. |ranges| has the new page range settings. | 85 // settings information. |ranges| has the new page range settings. |
86 Result UpdatePrintSettings(const base::DictionaryValue& job_settings); | 86 Result UpdatePrintSettings(const base::DictionaryValue& job_settings); |
87 | 87 |
88 // Initializes with predefined settings. | |
89 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | |
90 | |
91 // Does platform specific setup of the printer before the printing. Signal the | 88 // Does platform specific setup of the printer before the printing. Signal the |
92 // printer that a document is about to be spooled. | 89 // printer that a document is about to be spooled. |
93 // Warning: This function enters a message loop. That may cause side effects | 90 // Warning: This function enters a message loop. That may cause side effects |
94 // like IPC message processing! Some printers have side-effects on this call | 91 // like IPC message processing! Some printers have side-effects on this call |
95 // like virtual printers that ask the user for the path of the saved document; | 92 // like virtual printers that ask the user for the path of the saved document; |
96 // for example a PDF printer. | 93 // for example a PDF printer. |
97 virtual Result NewDocument(const base::string16& document_name) = 0; | 94 virtual Result NewDocument(const base::string16& document_name) = 0; |
98 | 95 |
99 // Starts a new page. | 96 // Starts a new page. |
100 virtual Result NewPage() = 0; | 97 virtual Result NewPage() = 0; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // Did the user cancel the print job. | 145 // Did the user cancel the print job. |
149 volatile bool abort_printing_; | 146 volatile bool abort_printing_; |
150 | 147 |
151 private: | 148 private: |
152 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 149 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
153 }; | 150 }; |
154 | 151 |
155 } // namespace printing | 152 } // namespace printing |
156 | 153 |
157 #endif // PRINTING_PRINTING_CONTEXT_H_ | 154 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |