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

Side by Side Diff: printing/printed_document.cc

Issue 1863223002: Convert //printing to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_page.h » ('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 #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
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
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
OLDNEW
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698