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

Side by Side Diff: chrome/browser/printing/print_system_task_proxy.cc

Issue 8280002: PrintPreview: Added code to honor the grayscale color model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/color_settings.js » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/printing/print_system_task_proxy.h" 5 #include "chrome/browser/printing/print_system_task_proxy.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ppd_file_t* ppd, int* color_model_for_black, int* color_model_for_color, 141 ppd_file_t* ppd, int* color_model_for_black, int* color_model_for_color,
142 bool* color_is_default) { 142 bool* color_is_default) {
143 ppd_option_t* color_model = ppdFindOption(ppd, kColorModel); 143 ppd_option_t* color_model = ppdFindOption(ppd, kColorModel);
144 if (!color_model) 144 if (!color_model)
145 return false; 145 return false;
146 146
147 if (ppdFindChoice(color_model, printing::kBlack)) 147 if (ppdFindChoice(color_model, printing::kBlack))
148 *color_model_for_black = printing::BLACK; 148 *color_model_for_black = printing::BLACK;
149 else if (ppdFindChoice(color_model, printing::kGray)) 149 else if (ppdFindChoice(color_model, printing::kGray))
150 *color_model_for_black = printing::GRAY; 150 *color_model_for_black = printing::GRAY;
151 else if (ppdFindChoice(color_model, printing::kGrayscale))
152 *color_model_for_black = printing::GRAYSCALE;
151 153
152 if (ppdFindChoice(color_model, printing::kColor)) 154 if (ppdFindChoice(color_model, printing::kColor))
153 *color_model_for_color = printing::COLOR; 155 *color_model_for_color = printing::COLOR;
154 else if (ppdFindChoice(color_model, printing::kCMYK)) 156 else if (ppdFindChoice(color_model, printing::kCMYK))
155 *color_model_for_color = printing::CMYK; 157 *color_model_for_color = printing::CMYK;
156 else if (ppdFindChoice(color_model, printing::kRGB)) 158 else if (ppdFindChoice(color_model, printing::kRGB))
157 *color_model_for_color = printing::RGB; 159 *color_model_for_color = printing::RGB;
158 else if (ppdFindChoice(color_model, printing::kRGBA)) 160 else if (ppdFindChoice(color_model, printing::kRGBA))
159 *color_model_for_color = printing::RGBA; 161 *color_model_for_color = printing::RGBA;
160 else if (ppdFindChoice(color_model, printing::kRGB16)) 162 else if (ppdFindChoice(color_model, printing::kRGB16))
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 base::Bind(&PrintSystemTaskProxy::SendPrinterCapabilities, this, 536 base::Bind(&PrintSystemTaskProxy::SendPrinterCapabilities, this,
535 settings_info.DeepCopy())); 537 settings_info.DeepCopy()));
536 } 538 }
537 539
538 void PrintSystemTaskProxy::SendPrinterCapabilities( 540 void PrintSystemTaskProxy::SendPrinterCapabilities(
539 DictionaryValue* settings_info) { 541 DictionaryValue* settings_info) {
540 if (handler_) 542 if (handler_)
541 handler_->SendPrinterCapabilities(*settings_info); 543 handler_->SendPrinterCapabilities(*settings_info);
542 delete settings_info; 544 delete settings_info;
543 } 545 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/color_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698