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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // Updates the context with PDF printer settings. | 54 // Updates the context with PDF printer settings. |
55 Result UsePdfSettings(); | 55 Result UsePdfSettings(); |
56 | 56 |
57 // Returns paper size to be used for PDF or Cloud Print in device units. | 57 // Returns paper size to be used for PDF or Cloud Print in device units. |
58 virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0; | 58 virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0; |
59 | 59 |
60 // Updates printer settings. | 60 // Updates printer settings. |
61 // |external_preview| is true if pdf is going to be opened in external | 61 // |external_preview| is true if pdf is going to be opened in external |
62 // preview. Used by MacOS only now to open Preview.app. | 62 // preview. Used by MacOS only now to open Preview.app. |
63 virtual Result UpdatePrinterSettings(bool external_preview) = 0; | 63 virtual Result UpdatePrinterSettings(bool external_preview, |
| 64 bool show_system_dialog, |
| 65 gfx::NativeView parent_view) = 0; |
64 | 66 |
65 // Updates Print Settings. |job_settings| contains all print job | 67 // Updates Print Settings. |job_settings| contains all print job |
66 // settings information. |ranges| has the new page range settings. | 68 // settings information. |ranges| has the new page range settings. |
67 Result UpdatePrintSettings(const base::DictionaryValue& job_settings); | 69 Result UpdatePrintSettings(const base::DictionaryValue& job_settings, |
68 | 70 gfx::NativeView parent_view); |
69 // Initializes with predefined settings. | 71 // Initializes with predefined settings. |
70 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | 72 virtual Result InitWithSettings(const PrintSettings& settings) = 0; |
71 | 73 |
72 // Does platform specific setup of the printer before the printing. Signal the | 74 // Does platform specific setup of the printer before the printing. Signal the |
73 // printer that a document is about to be spooled. | 75 // printer that a document is about to be spooled. |
74 // Warning: This function enters a message loop. That may cause side effects | 76 // Warning: This function enters a message loop. That may cause side effects |
75 // like IPC message processing! Some printers have side-effects on this call | 77 // like IPC message processing! Some printers have side-effects on this call |
76 // like virtual printers that ask the user for the path of the saved document; | 78 // like virtual printers that ask the user for the path of the saved document; |
77 // for example a PDF printer. | 79 // for example a PDF printer. |
78 virtual Result NewDocument(const base::string16& document_name) = 0; | 80 virtual Result NewDocument(const base::string16& document_name) = 0; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // The application locale. | 134 // The application locale. |
133 std::string app_locale_; | 135 std::string app_locale_; |
134 | 136 |
135 private: | 137 private: |
136 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 138 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
137 }; | 139 }; |
138 | 140 |
139 } // namespace printing | 141 } // namespace printing |
140 | 142 |
141 #endif // PRINTING_PRINTING_CONTEXT_H_ | 143 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |