OLD | NEW |
1 // Copyright (c) 2010 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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
(...skipping 28 matching lines...) Expand all Loading... |
40 // asynchronous printing API. | 40 // asynchronous printing API. |
41 virtual void AskUserForSettings(gfx::NativeView parent_view, | 41 virtual void AskUserForSettings(gfx::NativeView parent_view, |
42 int max_pages, | 42 int max_pages, |
43 bool has_selection, | 43 bool has_selection, |
44 PrintSettingsCallback* callback) = 0; | 44 PrintSettingsCallback* callback) = 0; |
45 | 45 |
46 // Selects the user's default printer and format. Updates the context with the | 46 // Selects the user's default printer and format. Updates the context with the |
47 // default device settings. | 47 // default device settings. |
48 virtual Result UseDefaultSettings() = 0; | 48 virtual Result UseDefaultSettings() = 0; |
49 | 49 |
| 50 // Update print settings. As of now we are updating the page range settings. |
| 51 // In the future, update other print job settings. |
| 52 virtual Result UpdatePrintSettings(const PageRanges& ranges) = 0; |
| 53 |
50 // Initializes with predefined settings. | 54 // Initializes with predefined settings. |
51 virtual Result InitWithSettings(const PrintSettings& settings) = 0; | 55 virtual Result InitWithSettings(const PrintSettings& settings) = 0; |
52 | 56 |
53 // Does platform specific setup of the printer before the printing. Signal the | 57 // Does platform specific setup of the printer before the printing. Signal the |
54 // printer that a document is about to be spooled. | 58 // printer that a document is about to be spooled. |
55 // Warning: This function enters a message loop. That may cause side effects | 59 // Warning: This function enters a message loop. That may cause side effects |
56 // like IPC message processing! Some printers have side-effects on this call | 60 // like IPC message processing! Some printers have side-effects on this call |
57 // like virtual printers that ask the user for the path of the saved document; | 61 // like virtual printers that ask the user for the path of the saved document; |
58 // for example a PDF printer. | 62 // for example a PDF printer. |
59 virtual Result NewDocument(const string16& document_name) = 0; | 63 virtual Result NewDocument(const string16& document_name) = 0; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 118 |
115 // The application locale. | 119 // The application locale. |
116 std::string app_locale_; | 120 std::string app_locale_; |
117 | 121 |
118 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 122 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
119 }; | 123 }; |
120 | 124 |
121 } // namespace printing | 125 } // namespace printing |
122 | 126 |
123 #endif // PRINTING_PRINTING_CONTEXT_H_ | 127 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |