OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/backend/cups_helper.h" | 5 #include "printing/backend/cups_helper.h" |
6 | 6 |
7 #include <cups/ppd.h> | 7 #include <cups/ppd.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 else | 375 else |
376 caps.duplex_default = printing::SIMPLEX; | 376 caps.duplex_default = printing::SIMPLEX; |
377 } | 377 } |
378 | 378 |
379 bool is_color = false; | 379 bool is_color = false; |
380 int cm_color = 0, cm_black = 0; | 380 int cm_color = 0, cm_black = 0; |
381 if (!GetColorModelSettings(ppd, &cm_black, &cm_color, &is_color)) { | 381 if (!GetColorModelSettings(ppd, &cm_black, &cm_color, &is_color)) { |
382 VLOG(1) << "Unknown printer color model"; | 382 VLOG(1) << "Unknown printer color model"; |
383 } | 383 } |
384 | 384 |
385 caps.color_capable = (cm_color && cm_black && (cm_color != cm_black)); | 385 caps.color_changeable = (cm_color && cm_black && (cm_color != cm_black)); |
386 caps.color_default = is_color; | 386 caps.color_default = is_color; |
387 | 387 |
388 ppdClose(ppd); | 388 ppdClose(ppd); |
389 file_util::Delete(ppd_file_path, false); | 389 file_util::Delete(ppd_file_path, false); |
390 | 390 |
391 *printer_info = caps; | 391 *printer_info = caps; |
392 return true; | 392 return true; |
393 } | 393 } |
394 | 394 |
395 } // namespace printing | 395 } // namespace printing |
OLD | NEW |