OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |