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

Side by Side Diff: printing/pdf_metafile_skia.cc

Issue 1550693002: Global conversion of Pass()→std::move() on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « mash/wm/window_manager_impl.cc ('k') | printing/printed_document.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pdf_metafile_skia.h" 5 #include "printing/pdf_metafile_skia.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 PdfMetafileSkia::PdfMetafileSkia() : data_(new PdfMetafileSkiaData) { 294 PdfMetafileSkia::PdfMetafileSkia() : data_(new PdfMetafileSkiaData) {
295 } 295 }
296 296
297 scoped_ptr<PdfMetafileSkia> PdfMetafileSkia::GetMetafileForCurrentPage() { 297 scoped_ptr<PdfMetafileSkia> PdfMetafileSkia::GetMetafileForCurrentPage() {
298 // If we only ever need the metafile for the last page, should we 298 // If we only ever need the metafile for the last page, should we
299 // only keep a handle on one SkPicture? 299 // only keep a handle on one SkPicture?
300 scoped_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia); 300 scoped_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia);
301 301
302 if (data_->pages_.size() == 0) 302 if (data_->pages_.size() == 0)
303 return metafile.Pass(); 303 return metafile;
304 304
305 if (data_->recorder_.getRecordingCanvas()) // page outstanding 305 if (data_->recorder_.getRecordingCanvas()) // page outstanding
306 return metafile.Pass(); 306 return metafile;
307 307
308 const Page& page = data_->pages_.back(); 308 const Page& page = data_->pages_.back();
309 309
310 metafile->data_->pages_.push_back(page); 310 metafile->data_->pages_.push_back(page);
311 311
312 if (!metafile->FinishDocument()) // Generate PDF. 312 if (!metafile->FinishDocument()) // Generate PDF.
313 metafile.reset(); 313 metafile.reset();
314 314
315 return metafile.Pass(); 315 return metafile;
316 } 316 }
317 317
318 } // namespace printing 318 } // namespace printing
OLDNEW
« no previous file with comments | « mash/wm/window_manager_impl.cc ('k') | printing/printed_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698