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

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: Addressed review comments. 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
« no previous file with comments | « content/browser/renderer_host/render_view_host.cc ('k') | printing/printing_context_cairo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28 matching lines...) Expand all
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
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
« no previous file with comments | « content/browser/renderer_host/render_view_host.cc ('k') | printing/printing_context_cairo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698