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

Side by Side Diff: printing/pdf_metafile_skia.cc

Issue 2812263002: clean up printing::Image and printing::Metafile (Closed)
Patch Set: definition matches declaration Created 3 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/pdf_metafile_skia.h ('k') | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return base::checked_cast<unsigned int>(data_->pages_.size()); 226 return base::checked_cast<unsigned int>(data_->pages_.size());
227 } 227 }
228 228
229 skia::NativeDrawingContext PdfMetafileSkia::context() const { 229 skia::NativeDrawingContext PdfMetafileSkia::context() const {
230 NOTREACHED(); 230 NOTREACHED();
231 return nullptr; 231 return nullptr;
232 } 232 }
233 233
234 234
235 #if defined(OS_WIN) 235 #if defined(OS_WIN)
236 bool PdfMetafileSkia::Playback(skia::NativeDrawingContext hdc,
237 const RECT* rect) const {
238 NOTREACHED();
239 return false;
240 }
241
242 bool PdfMetafileSkia::SafePlayback(skia::NativeDrawingContext hdc) const { 236 bool PdfMetafileSkia::SafePlayback(skia::NativeDrawingContext hdc) const {
243 NOTREACHED(); 237 NOTREACHED();
244 return false; 238 return false;
245 } 239 }
246 #endif 240 #endif
247 241
248 bool PdfMetafileSkia::SaveTo(base::File* file) const { 242 bool PdfMetafileSkia::SaveTo(base::File* file) const {
249 if (GetDataSize() == 0U) 243 if (GetDataSize() == 0U)
250 return false; 244 return false;
251 245
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 281
288 metafile->data_->pages_.push_back(data_->pages_.back()); 282 metafile->data_->pages_.push_back(data_->pages_.back());
289 283
290 if (!metafile->FinishDocument()) // Generate PDF. 284 if (!metafile->FinishDocument()) // Generate PDF.
291 metafile.reset(); 285 metafile.reset();
292 286
293 return metafile; 287 return metafile;
294 } 288 }
295 289
296 } // namespace printing 290 } // namespace printing
OLDNEW
« no previous file with comments | « printing/pdf_metafile_skia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698