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

Side by Side Diff: printing/printing_context_mac.h

Issue 8426002: PrintPreview: [MAC] Set the system default page size in NSPrintInfo PMPageFormat. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: '' Created 9 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 | « no previous file | printing/printing_context_mac.mm » ('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_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/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // info object and use |ranges| instead. 50 // info object and use |ranges| instead.
51 void InitPrintSettingsFromPrintInfo(const PageRanges& ranges); 51 void InitPrintSettingsFromPrintInfo(const PageRanges& ranges);
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.
61 // Returns true if the paper was set else returns false.
62 bool UpdatePageFormatWithPaperInfo();
63
60 // Sets |copies| in PMPrintSettings. 64 // Sets |copies| in PMPrintSettings.
61 // Returns true if the number of copies is set. 65 // Returns true if the number of copies is set.
62 bool SetCopiesInPrintSettings(int copies); 66 bool SetCopiesInPrintSettings(int copies);
63 67
64 // Sets |collate| in PMPrintSettings. 68 // Sets |collate| in PMPrintSettings.
65 // Returns true if |collate| is set. 69 // Returns true if |collate| is set.
66 bool SetCollateInPrintSettings(bool collate); 70 bool SetCollateInPrintSettings(bool collate);
67 71
68 // Sets orientation in native print info object. 72 // Sets orientation in native print info object.
69 // Returns true if the orientation was set. 73 // Returns true if the orientation was set.
(...skipping 13 matching lines...) Expand all
83 // The current page's context; only valid between NewPage and PageDone call 87 // The current page's context; only valid between NewPage and PageDone call
84 // pairs. 88 // pairs.
85 CGContext* context_; 89 CGContext* context_;
86 90
87 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); 91 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac);
88 }; 92 };
89 93
90 } // namespace printing 94 } // namespace printing
91 95
92 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ 96 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | printing/printing_context_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698