Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: printing/printing_context.h

Issue 6533006: Print Preview: Hook up the print button to initiate printing without displaying a print dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Initializes with predefined settings. 50 // Initializes with predefined settings.
51 virtual Result InitWithSettings(const PrintSettings& settings) = 0; 51 virtual Result InitWithSettings(const PrintSettings& settings) = 0;
52 52
53 // Update print settings. As of now we are updating the page range settings.
54 // In future, update other print job settings.
Lei Zhang 2011/03/03 00:22:44 nit: in the future.
kmadhusu 2011/03/04 19:39:02 Done.
55 virtual Result UpdatePrintSettings(const PageRanges& ranges) = 0;
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;
60 64
61 // Starts a new page. 65 // Starts a new page.
62 virtual Result NewPage() = 0; 66 virtual Result NewPage() = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698