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

Side by Side Diff: printing/printing_context.h

Issue 47823002: De-duplicate job_settings parsing code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Noam's comments Created 7 years, 1 month 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 | « printing/printed_document.cc ('k') | printing/printing_context.cc » ('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) 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
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 const PrintSettingsCallback& callback) = 0; 48 const 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 printer settings.
55 // settings information. |ranges| has the new page range settings. 55 // |pdf_only| is true if implementation needs to generate PDF without actual
56 virtual Result UpdatePrinterSettings( 56 // printing. In this case implementation may avoid setup of native print
57 const base::DictionaryValue& job_settings, 57 // system. Ex. "save to pdf" or Cloud Print.
58 const PageRanges& ranges) = 0; 58 // |external_preview| is true if pdf is going to be opened in external
59 // preview.
60 virtual Result UpdatePrinterSettings(bool target_is_pdf,
61 bool external_preview) = 0;
59 62
60 // Updates Print Settings. |job_settings| contains all print job 63 // Updates Print Settings. |job_settings| contains all print job
61 // settings information. |ranges| has the new page range settings. 64 // settings information. |ranges| has the new page range settings.
62 Result UpdatePrintSettings(const base::DictionaryValue& job_settings, 65 Result UpdatePrintSettings(const base::DictionaryValue& job_settings,
63 const PageRanges& ranges); 66 const PageRanges& ranges);
64 67
65 // Initializes with predefined settings. 68 // Initializes with predefined settings.
66 virtual Result InitWithSettings(const PrintSettings& settings) = 0; 69 virtual Result InitWithSettings(const PrintSettings& settings) = 0;
67 70
68 // Does platform specific setup of the printer before the printing. Signal the 71 // Does platform specific setup of the printer before the printing. Signal the
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // The application locale. 131 // The application locale.
129 std::string app_locale_; 132 std::string app_locale_;
130 133
131 private: 134 private:
132 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 135 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
133 }; 136 };
134 137
135 } // namespace printing 138 } // namespace printing
136 139
137 #endif // PRINTING_PRINTING_CONTEXT_H_ 140 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698