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