| 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 <utility> | 10 #include <utility> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (!g_debug_dump_info.Get().empty()) | 105 if (!g_debug_dump_info.Get().empty()) |
| 106 DebugDumpSettings(name(), settings, blocking_runner); | 106 DebugDumpSettings(name(), settings, blocking_runner); |
| 107 } | 107 } |
| 108 | 108 |
| 109 PrintedDocument::~PrintedDocument() { | 109 PrintedDocument::~PrintedDocument() { |
| 110 } | 110 } |
| 111 | 111 |
| 112 void PrintedDocument::SetPage(int page_number, | 112 void PrintedDocument::SetPage(int page_number, |
| 113 scoped_ptr<MetafilePlayer> metafile, | 113 std::unique_ptr<MetafilePlayer> metafile, |
| 114 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
| 115 float shrink, | 115 float shrink, |
| 116 #endif // OS_WIN | 116 #endif // OS_WIN |
| 117 const gfx::Size& paper_size, | 117 const gfx::Size& paper_size, |
| 118 const gfx::Rect& page_rect) { | 118 const gfx::Rect& page_rect) { |
| 119 // Notice the page_number + 1, the reason is that this is the value that will | 119 // Notice the page_number + 1, the reason is that this is the value that will |
| 120 // be shown. Users dislike 0-based counting. | 120 // be shown. Users dislike 0-based counting. |
| 121 scoped_refptr<PrintedPage> page(new PrintedPage( | 121 scoped_refptr<PrintedPage> page(new PrintedPage( |
| 122 page_number + 1, std::move(metafile), paper_size, page_rect)); | 122 page_number + 1, std::move(metafile), paper_size, page_rect)); |
| 123 #if defined(OS_WIN) | 123 #if defined(OS_WIN) |
| (...skipping 140 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 |