| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Updates the context with PDF printer settings. | 70 // Updates the context with PDF printer settings. |
| 71 Result UsePdfSettings(); | 71 Result UsePdfSettings(); |
| 72 | 72 |
| 73 // Returns paper size to be used for PDF or Cloud Print in device units. | 73 // Returns paper size to be used for PDF or Cloud Print in device units. |
| 74 virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0; | 74 virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0; |
| 75 | 75 |
| 76 // Updates printer settings. | 76 // Updates printer settings. |
| 77 // |external_preview| is true if pdf is going to be opened in external | 77 // |external_preview| is true if pdf is going to be opened in external |
| 78 // preview. Used by MacOS only now to open Preview.app. | 78 // preview. Used by MacOS only now to open Preview.app. |
| 79 virtual Result UpdatePrinterSettings(bool external_preview, | 79 virtual Result UpdatePrinterSettings(bool external_preview, |
| 80 bool show_system_dialog) = 0; | 80 bool show_system_dialog, |
| 81 int page_count) = 0; |
| 81 | 82 |
| 82 // Updates Print Settings. |job_settings| contains all print job | 83 // Updates Print Settings. |job_settings| contains all print job |
| 83 // settings information. |ranges| has the new page range settings. | 84 // settings information. |ranges| has the new page range settings. |
| 84 Result UpdatePrintSettings(const base::DictionaryValue& job_settings); | 85 Result UpdatePrintSettings(const base::DictionaryValue& job_settings); |
| 85 | 86 |
| 86 // Initializes with predefined settings. | 87 // Initializes with predefined settings. |
| 87 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | 88 virtual Result InitWithSettings(const PrintSettings& settings) = 0; |
| 88 | 89 |
| 89 // Does platform specific setup of the printer before the printing. Signal the | 90 // Does platform specific setup of the printer before the printing. Signal the |
| 90 // printer that a document is about to be spooled. | 91 // printer that a document is about to be spooled. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Did the user cancel the print job. | 146 // Did the user cancel the print job. |
| 146 volatile bool abort_printing_; | 147 volatile bool abort_printing_; |
| 147 | 148 |
| 148 private: | 149 private: |
| 149 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 150 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 } // namespace printing | 153 } // namespace printing |
| 153 | 154 |
| 154 #endif // PRINTING_PRINTING_CONTEXT_H_ | 155 #endif // PRINTING_PRINTING_CONTEXT_H_ |
| OLD | NEW |