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

Side by Side Diff: printing/printing_context.h

Issue 46623002: Move settings setup for PDF and cloud print into single location in PrintingContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 // Returns paper size to be used for PDF or Cloud Print in device units.
55 virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0;
56
54 // Updates printer settings. 57 // Updates printer settings.
55 // |target_is_pdf| is true if implementation needs to generate PDF without
56 // actual printing. In this case implementation may avoid setup of native
57 // print system. Ex. "save to pdf" or Cloud Print.
58 // |external_preview| is true if pdf is going to be opened in external 58 // |external_preview| is true if pdf is going to be opened in external
59 // preview. Used by MacOS only now to open Preview.app. 59 // preview. Used by MacOS only now to open Preview.app.
60 virtual Result UpdatePrinterSettings(bool target_is_pdf, 60 virtual Result UpdatePrinterSettings(bool external_preview) = 0;
61 bool external_preview) = 0;
62 61
63 // Updates Print Settings. |job_settings| contains all print job 62 // Updates Print Settings. |job_settings| contains all print job
64 // settings information. |ranges| has the new page range settings. 63 // settings information. |ranges| has the new page range settings.
65 Result UpdatePrintSettings(const base::DictionaryValue& job_settings, 64 Result UpdatePrintSettings(const base::DictionaryValue& job_settings,
66 const PageRanges& ranges); 65 const PageRanges& ranges);
67 66
68 // Initializes with predefined settings. 67 // Initializes with predefined settings.
69 virtual Result InitWithSettings(const PrintSettings& settings) = 0; 68 virtual Result InitWithSettings(const PrintSettings& settings) = 0;
70 69
71 // Does platform specific setup of the printer before the printing. Signal the 70 // Does platform specific setup of the printer before the printing. Signal the
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // The application locale. 130 // The application locale.
132 std::string app_locale_; 131 std::string app_locale_;
133 132
134 private: 133 private:
135 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 134 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
136 }; 135 };
137 136
138 } // namespace printing 137 } // namespace printing
139 138
140 #endif // PRINTING_PRINTING_CONTEXT_H_ 139 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698