Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: printing/printing_context_chromeos.cc

Issue 2400873002: keep only one typedef for the native drawing context (Closed)
Patch Set: native_drawing_context.h Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « printing/printing_context_chromeos.h ('k') | printing/printing_context_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « printing/printing_context_chromeos.h ('k') | printing/printing_context_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698