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

Side by Side Diff: printing/pdf_metafile_skia.cc

Issue 2835193007: Revert of clean up printing::Image and printing::Metafile (Closed)
Patch Set: 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
236 bool PdfMetafileSkia::SafePlayback(skia::NativeDrawingContext hdc) const { 242 bool PdfMetafileSkia::SafePlayback(skia::NativeDrawingContext hdc) const {
237 NOTREACHED(); 243 NOTREACHED();
238 return false; 244 return false;
239 } 245 }
240 #endif 246 #endif
241 247
242 bool PdfMetafileSkia::SaveTo(base::File* file) const { 248 bool PdfMetafileSkia::SaveTo(base::File* file) const {
243 if (GetDataSize() == 0U) 249 if (GetDataSize() == 0U)
244 return false; 250 return false;
245 251
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 287
282 metafile->data_->pages_.push_back(data_->pages_.back()); 288 metafile->data_->pages_.push_back(data_->pages_.back());
283 289
284 if (!metafile->FinishDocument()) // Generate PDF. 290 if (!metafile->FinishDocument()) // Generate PDF.
285 metafile.reset(); 291 metafile.reset();
286 292
287 return metafile; 293 return metafile;
288 } 294 }
289 295
290 } // namespace printing 296 } // 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