| 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 28 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |