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

Side by Side Diff: printing/printing_context_mac.h

Issue 345493003: Apply paper size selection for local printers on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wed 06/18/2014 17:38:32.02 Created 6 years, 6 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 | « no previous file | printing/printing_context_mac.mm » ('j') | printing/printing_context_mac.mm » ('J')
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_MAC_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_MAC_H_
6 #define PRINTING_PRINTING_CONTEXT_MAC_H_ 6 #define PRINTING_PRINTING_CONTEXT_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // info object and use |settings_.ranges| instead. 50 // info object and use |settings_.ranges| instead.
51 void InitPrintSettingsFromPrintInfo(); 51 void InitPrintSettingsFromPrintInfo();
52 52
53 // Returns the set of page ranges constructed from |print_info_|. 53 // Returns the set of page ranges constructed from |print_info_|.
54 PageRanges GetPageRangesFromPrintInfo(); 54 PageRanges GetPageRangesFromPrintInfo();
55 55
56 // Updates |print_info_| to use the given printer. 56 // Updates |print_info_| to use the given printer.
57 // Returns true if the printer was set else returns false. 57 // Returns true if the printer was set else returns false.
58 bool SetPrinter(const std::string& device_name); 58 bool SetPrinter(const std::string& device_name);
59 59
60 // Updates |print_info_| page format with user default paper information. 60 // Updates |print_info_| page format with paper selected by user. If paper was
61 // not selected, default system paper is used.
61 // Returns true if the paper was set else returns false. 62 // Returns true if the paper was set else returns false.
62 bool UpdatePageFormatWithPaperInfo(); 63 bool UpdatePageFormatWithPaperInfo();
63 64
65 // Updates |print_info_| page format with |paper|.
66 // Returns true if the paper was set else returns false.
Aleksey Shlyapnikov 2014/06/19 02:13:08 else -> otherwise
Vitaly Buka (NO REVIEWS) 2014/06/19 17:44:38 Done.
67 bool UpdatePageFormatWithPaper(PMPaper paper, PMPageFormat page_format);
68
64 // Sets the print job destination type as preview job. 69 // Sets the print job destination type as preview job.
65 // Returns true if the print job destination type is set. 70 // Returns true if the print job destination type is set.
66 bool SetPrintPreviewJob(); 71 bool SetPrintPreviewJob();
67 72
68 // Sets |copies| in PMPrintSettings. 73 // Sets |copies| in PMPrintSettings.
69 // Returns true if the number of copies is set. 74 // Returns true if the number of copies is set.
70 bool SetCopiesInPrintSettings(int copies); 75 bool SetCopiesInPrintSettings(int copies);
71 76
72 // Sets |collate| in PMPrintSettings. 77 // Sets |collate| in PMPrintSettings.
73 // Returns true if |collate| is set. 78 // Returns true if |collate| is set.
(...skipping 17 matching lines...) Expand all
91 // The current page's context; only valid between NewPage and PageDone call 96 // The current page's context; only valid between NewPage and PageDone call
92 // pairs. 97 // pairs.
93 CGContext* context_; 98 CGContext* context_;
94 99
95 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); 100 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac);
96 }; 101 };
97 102
98 } // namespace printing 103 } // namespace printing
99 104
100 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ 105 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | printing/printing_context_mac.mm » ('j') | printing/printing_context_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698