OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_chromeos.h" | 5 #include "printing/printing_context_chromeos.h" |
6 | 6 |
7 #include <cups/cups.h> | 7 #include <cups/cups.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <unicode/ulocdata.h> | 9 #include <unicode/ulocdata.h> |
10 | 10 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 363 |
364 void PrintingContextChromeos::Cancel() { | 364 void PrintingContextChromeos::Cancel() { |
365 abort_printing_ = true; | 365 abort_printing_ = true; |
366 in_print_job_ = false; | 366 in_print_job_ = false; |
367 } | 367 } |
368 | 368 |
369 void PrintingContextChromeos::ReleaseContext() { | 369 void PrintingContextChromeos::ReleaseContext() { |
370 printer_.reset(); | 370 printer_.reset(); |
371 } | 371 } |
372 | 372 |
| 373 void PrintingContextChromeos::SetPostScriptEnabled(bool is_enabled) { |
| 374 // Intentional No-op. |
| 375 } |
| 376 |
373 skia::NativeDrawingContext PrintingContextChromeos::context() const { | 377 skia::NativeDrawingContext PrintingContextChromeos::context() const { |
374 // Intentional No-op. | 378 // Intentional No-op. |
375 return nullptr; | 379 return nullptr; |
376 } | 380 } |
377 | 381 |
378 PrintingContext::Result PrintingContextChromeos::StreamData( | 382 PrintingContext::Result PrintingContextChromeos::StreamData( |
379 const std::vector<char>& buffer) { | 383 const std::vector<char>& buffer) { |
380 if (abort_printing_) | 384 if (abort_printing_) |
381 return CANCEL; | 385 return CANCEL; |
382 | 386 |
383 DCHECK(in_print_job_); | 387 DCHECK(in_print_job_); |
384 DCHECK(printer_); | 388 DCHECK(printer_); |
385 | 389 |
386 if (!printer_->StreamData(buffer)) | 390 if (!printer_->StreamData(buffer)) |
387 return OnError(); | 391 return OnError(); |
388 | 392 |
389 return OK; | 393 return OK; |
390 } | 394 } |
391 | 395 |
392 } // namespace printing | 396 } // namespace printing |
OLD | NEW |