Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 29 matching lines...) Expand all Loading... | |
| 40 virtual void Cancel(); | 40 virtual void Cancel(); |
| 41 virtual void ReleaseContext(); | 41 virtual void ReleaseContext(); |
| 42 virtual gfx::NativeDrawingContext context() const; | 42 virtual gfx::NativeDrawingContext context() const; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // Initializes PrintSettings from |print_info_|. This must be called | 45 // Initializes PrintSettings from |print_info_|. This must be called |
| 46 // after changes to |print_info_| in order for the changes to take effect in | 46 // after changes to |print_info_| in order for the changes to take effect in |
| 47 // printing. | 47 // printing. |
| 48 // This function ignores the page range information specified in the print | 48 // This function ignores the page range information specified in the print |
| 49 // info object and use |ranges| instead. | 49 // info object and use |ranges| instead. |
| 50 void InitPrintSettingsFromPrintInfo(const PageRanges& ranges); | 50 void InitPrintSettingsFromPrintInfo( |
| 51 const PageRanges& ranges, | |
| 52 const DictionaryValue& header_footer_info); | |
|
kmadhusu
2011/08/12 17:07:00
document |header_footer_info|
Aayush Kumar
2011/08/12 18:53:42
Done.
| |
| 51 | 53 |
| 52 // Returns the set of page ranges constructed from |print_info_|. | 54 // Returns the set of page ranges constructed from |print_info_|. |
| 53 PageRanges GetPageRangesFromPrintInfo(); | 55 PageRanges GetPageRangesFromPrintInfo(); |
| 54 | 56 |
| 55 // Updates |print_info_| to use the given printer. | 57 // Updates |print_info_| to use the given printer. |
| 56 // Returns true if the printer was set else returns false. | 58 // Returns true if the printer was set else returns false. |
| 57 bool SetPrinter(const std::string& device_name); | 59 bool SetPrinter(const std::string& device_name); |
| 58 | 60 |
| 59 // Sets |copies| in PMPrintSettings. | 61 // Sets |copies| in PMPrintSettings. |
| 60 // Returns true if the number of copies is set. | 62 // Returns true if the number of copies is set. |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 82 // The current page's context; only valid between NewPage and PageDone call | 84 // The current page's context; only valid between NewPage and PageDone call |
| 83 // pairs. | 85 // pairs. |
| 84 CGContext* context_; | 86 CGContext* context_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); | 88 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace printing | 91 } // namespace printing |
| 90 | 92 |
| 91 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ | 93 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ |
| OLD | NEW |