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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // asynchronous printing API. | 44 // asynchronous printing API. |
45 virtual void AskUserForSettings(gfx::NativeView parent_view, | 45 virtual void AskUserForSettings(gfx::NativeView parent_view, |
46 int max_pages, | 46 int max_pages, |
47 bool has_selection, | 47 bool has_selection, |
48 PrintSettingsCallback* callback) = 0; | 48 PrintSettingsCallback* callback) = 0; |
49 | 49 |
50 // Selects the user's default printer and format. Updates the context with the | 50 // Selects the user's default printer and format. Updates the context with the |
51 // default device settings. | 51 // default device settings. |
52 virtual Result UseDefaultSettings() = 0; | 52 virtual Result UseDefaultSettings() = 0; |
53 | 53 |
54 // Updates printer related settings. |job_settings| contains all print job | 54 // Updates print settings. |job_settings| contains all print job settings |
55 // settings information. |ranges| has the new page range settings. | 55 // information. |ranges| has the new page range settings. |
56 virtual Result UpdatePrinterSettings( | 56 virtual Result UpdatePrintSettings(const base::DictionaryValue& job_settings, |
57 const base::DictionaryValue& job_settings, | 57 const PageRanges& ranges) = 0; |
58 const PageRanges& ranges) = 0; | |
59 | |
60 // Updates Print Settings. |job_settings| contains all print job | |
61 // settings information. |ranges| has the new page range settings. | |
62 Result UpdatePrintSettings(const base::DictionaryValue& job_settings, | |
63 const PageRanges& ranges); | |
64 | 58 |
65 // Initializes with predefined settings. | 59 // Initializes with predefined settings. |
66 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | 60 virtual Result InitWithSettings(const PrintSettings& settings) = 0; |
67 | 61 |
68 // Does platform specific setup of the printer before the printing. Signal the | 62 // Does platform specific setup of the printer before the printing. Signal the |
69 // printer that a document is about to be spooled. | 63 // printer that a document is about to be spooled. |
70 // Warning: This function enters a message loop. That may cause side effects | 64 // 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 | 65 // 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; | 66 // like virtual printers that ask the user for the path of the saved document; |
73 // for example a PDF printer. | 67 // for example a PDF printer. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 123 |
130 // The application locale. | 124 // The application locale. |
131 std::string app_locale_; | 125 std::string app_locale_; |
132 | 126 |
133 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 127 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
134 }; | 128 }; |
135 | 129 |
136 } // namespace printing | 130 } // namespace printing |
137 | 131 |
138 #endif // PRINTING_PRINTING_CONTEXT_H_ | 132 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |