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 gfx::NativeDrawingContext PrintingContextChromeos::context() const { | 373 skia::NativeDrawingContext PrintingContextChromeos::context() const { |
374 // Intentional No-op. | 374 // Intentional No-op. |
375 return nullptr; | 375 return nullptr; |
376 } | 376 } |
377 | 377 |
378 PrintingContext::Result PrintingContextChromeos::StreamData( | 378 PrintingContext::Result PrintingContextChromeos::StreamData( |
379 const std::vector<char>& buffer) { | 379 const std::vector<char>& buffer) { |
380 if (abort_printing_) | 380 if (abort_printing_) |
381 return CANCEL; | 381 return CANCEL; |
382 | 382 |
383 DCHECK(in_print_job_); | 383 DCHECK(in_print_job_); |
384 DCHECK(printer_); | 384 DCHECK(printer_); |
385 | 385 |
386 if (!printer_->StreamData(buffer)) | 386 if (!printer_->StreamData(buffer)) |
387 return OnError(); | 387 return OnError(); |
388 | 388 |
389 return OK; | 389 return OK; |
390 } | 390 } |
391 | 391 |
392 } // namespace printing | 392 } // namespace printing |
OLD | NEW |