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

Side by Side Diff: printing/printing_context_chromeos.cc

Issue 2739133002: Better detect options for Brother CUPS printers. (Closed)
Patch Set: Fix more color checks Created 3 years, 9 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/print_settings.cc ('k') | no next file » | 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 28 matching lines...) Expand all
39 switch (color_mode) { 39 switch (color_mode) {
40 case COLOR: 40 case COLOR:
41 case CMYK: 41 case CMYK:
42 case CMY: 42 case CMY:
43 case KCMY: 43 case KCMY:
44 case CMY_K: 44 case CMY_K:
45 case RGB: 45 case RGB:
46 case RGB16: 46 case RGB16:
47 case RGBA: 47 case RGBA:
48 case COLORMODE_COLOR: 48 case COLORMODE_COLOR:
49 case BROTHER_COLOR_COLOR:
49 case HP_COLOR_COLOR: 50 case HP_COLOR_COLOR:
50 case PRINTOUTMODE_NORMAL: 51 case PRINTOUTMODE_NORMAL:
51 case PROCESSCOLORMODEL_CMYK: 52 case PROCESSCOLORMODEL_CMYK:
52 case PROCESSCOLORMODEL_RGB: 53 case PROCESSCOLORMODEL_RGB:
53 mode_string = CUPS_PRINT_COLOR_MODE_COLOR; 54 mode_string = CUPS_PRINT_COLOR_MODE_COLOR;
54 break; 55 break;
55 case GRAY: 56 case GRAY:
56 case BLACK: 57 case BLACK:
57 case GRAYSCALE: 58 case GRAYSCALE:
58 case COLORMODE_MONOCHROME: 59 case COLORMODE_MONOCHROME:
60 case BROTHER_COLOR_BLACK:
59 case HP_COLOR_BLACK: 61 case HP_COLOR_BLACK:
60 case PRINTOUTMODE_NORMAL_GRAY: 62 case PRINTOUTMODE_NORMAL_GRAY:
61 case PROCESSCOLORMODEL_GREYSCALE: 63 case PROCESSCOLORMODEL_GREYSCALE:
62 mode_string = CUPS_PRINT_COLOR_MODE_MONOCHROME; 64 mode_string = CUPS_PRINT_COLOR_MODE_MONOCHROME;
63 break; 65 break;
64 default: 66 default:
65 mode_string = nullptr; 67 mode_string = nullptr;
66 LOG(WARNING) << "Unrecognized color mode"; 68 LOG(WARNING) << "Unrecognized color mode";
67 break; 69 break;
68 } 70 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 DCHECK(in_print_job_); 385 DCHECK(in_print_job_);
384 DCHECK(printer_); 386 DCHECK(printer_);
385 387
386 if (!printer_->StreamData(buffer)) 388 if (!printer_->StreamData(buffer))
387 return OnError(); 389 return OnError();
388 390
389 return OK; 391 return OK;
390 } 392 }
391 393
392 } // namespace printing 394 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698