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/printing_context_win.h" | 5 #include "printing/printing_context_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 return OK; | 278 return OK; |
279 } | 279 } |
280 | 280 |
281 PrintingContext::Result PrintingContextWin::NewPage() { | 281 PrintingContext::Result PrintingContextWin::NewPage() { |
282 if (abort_printing_) | 282 if (abort_printing_) |
283 return CANCEL; | 283 return CANCEL; |
284 DCHECK(context_); | 284 DCHECK(context_); |
285 DCHECK(in_print_job_); | 285 DCHECK(in_print_job_); |
286 | 286 |
287 // Intentional No-op. NativeMetafile::SafePlayback takes care of calling | 287 // Intentional No-op. PdfMetafileSkia::SafePlayback takes care of calling |
288 // ::StartPage(). | 288 // ::StartPage(). |
289 | 289 |
290 return OK; | 290 return OK; |
291 } | 291 } |
292 | 292 |
293 PrintingContext::Result PrintingContextWin::PageDone() { | 293 PrintingContext::Result PrintingContextWin::PageDone() { |
294 if (abort_printing_) | 294 if (abort_printing_) |
295 return CANCEL; | 295 return CANCEL; |
296 DCHECK(in_print_job_); | 296 DCHECK(in_print_job_); |
297 | 297 |
298 // Intentional No-op. NativeMetafile::SafePlayback takes care of calling | 298 // Intentional No-op. PdfMetafileSkia::SafePlayback takes care of calling |
299 // ::EndPage(). | 299 // ::EndPage(). |
300 | 300 |
301 return OK; | 301 return OK; |
302 } | 302 } |
303 | 303 |
304 PrintingContext::Result PrintingContextWin::DocumentDone() { | 304 PrintingContext::Result PrintingContextWin::DocumentDone() { |
305 if (abort_printing_) | 305 if (abort_printing_) |
306 return CANCEL; | 306 return CANCEL; |
307 DCHECK(in_print_job_); | 307 DCHECK(in_print_job_); |
308 DCHECK(context_); | 308 DCHECK(context_); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 if (canceled) { | 388 if (canceled) { |
389 result.reset(); | 389 result.reset(); |
390 abort_printing_ = true; | 390 abort_printing_ = true; |
391 } | 391 } |
392 | 392 |
393 return result.Pass(); | 393 return result.Pass(); |
394 } | 394 } |
395 | 395 |
396 } // namespace printing | 396 } // namespace printing |
OLD | NEW |