| 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 #include "printing/printed_document.h" | 5 #include "printing/printed_document.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (!g_debug_dump_info.Get().empty()) | 106 if (!g_debug_dump_info.Get().empty()) |
| 107 DebugDumpSettings(name(), settings, blocking_runner); | 107 DebugDumpSettings(name(), settings, blocking_runner); |
| 108 } | 108 } |
| 109 | 109 |
| 110 PrintedDocument::~PrintedDocument() { | 110 PrintedDocument::~PrintedDocument() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 void PrintedDocument::SetPage(int page_number, | 113 void PrintedDocument::SetPage(int page_number, |
| 114 scoped_ptr<MetafilePlayer> metafile, | 114 scoped_ptr<MetafilePlayer> metafile, |
| 115 #if defined(OS_WIN) | 115 #if defined(OS_WIN) |
| 116 double shrink, | 116 float shrink, |
| 117 #endif // OS_WIN | 117 #endif // OS_WIN |
| 118 const gfx::Size& paper_size, | 118 const gfx::Size& paper_size, |
| 119 const gfx::Rect& page_rect) { | 119 const gfx::Rect& page_rect) { |
| 120 // Notice the page_number + 1, the reason is that this is the value that will | 120 // Notice the page_number + 1, the reason is that this is the value that will |
| 121 // be shown. Users dislike 0-based counting. | 121 // be shown. Users dislike 0-based counting. |
| 122 scoped_refptr<PrintedPage> page( | 122 scoped_refptr<PrintedPage> page( |
| 123 new PrintedPage(page_number + 1, metafile.Pass(), paper_size, page_rect)); | 123 new PrintedPage(page_number + 1, metafile.Pass(), paper_size, page_rect)); |
| 124 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
| 125 page->set_shrink_factor(shrink); | 125 page->set_shrink_factor(shrink); |
| 126 #endif // OS_WIN | 126 #endif // OS_WIN |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 264 } |
| 265 | 265 |
| 266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 267 // This function is not used on aura linux/chromeos or android. | 267 // This function is not used on aura linux/chromeos or android. |
| 268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, | 268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, |
| 269 PrintingContext* context) const { | 269 PrintingContext* context) const { |
| 270 } | 270 } |
| 271 #endif | 271 #endif |
| 272 | 272 |
| 273 } // namespace printing | 273 } // namespace printing |
| OLD | NEW |