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

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

Issue 11641003: Renamed color_capable to color_changeable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | printing/backend/cups_helper.cc » ('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) 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 "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 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 LOG(WARNING) << "Failed to get capabilities for " << printer_name; 130 LOG(WARNING) << "Failed to get capabilities for " << printer_name;
131 BrowserThread::PostTask( 131 BrowserThread::PostTask(
132 BrowserThread::UI, FROM_HERE, 132 BrowserThread::UI, FROM_HERE,
133 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities, 133 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities,
134 this, printer_name)); 134 this, printer_name));
135 return; 135 return;
136 } 136 }
137 137
138 DictionaryValue settings_info; 138 DictionaryValue settings_info;
139 settings_info.SetString(kPrinterId, printer_name); 139 settings_info.SetString(kPrinterId, printer_name);
140 settings_info.SetBoolean(kDisableColorOption, !info.color_capable); 140 settings_info.SetBoolean(kDisableColorOption, !info.color_changeable);
141 settings_info.SetBoolean(printing::kSettingSetColorAsDefault, 141 settings_info.SetBoolean(printing::kSettingSetColorAsDefault,
142 info.color_default); 142 info.color_default);
143 // TODO(gene): Make new capabilities format for Print Preview 143 // TODO(gene): Make new capabilities format for Print Preview
144 // that will suit semantic capabiltities better. 144 // that will suit semantic capabiltities better.
145 // Refactor pld API code below 145 // Refactor pld API code below
146 if (info.duplex_capable) { 146 if (info.duplex_capable) {
147 settings_info.SetBoolean(kSetDuplexAsDefault, 147 settings_info.SetBoolean(kSetDuplexAsDefault,
148 info.duplex_default != printing::SIMPLEX); 148 info.duplex_default != printing::SIMPLEX);
149 settings_info.SetInteger(kPrinterDefaultDuplexValue, 149 settings_info.SetInteger(kPrinterDefaultDuplexValue,
150 printing::LONG_EDGE); 150 printing::LONG_EDGE);
(...skipping 14 matching lines...) Expand all
165 if (handler_) 165 if (handler_)
166 handler_->SendPrinterCapabilities(*settings_info); 166 handler_->SendPrinterCapabilities(*settings_info);
167 delete settings_info; 167 delete settings_info;
168 } 168 }
169 169
170 void PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities( 170 void PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities(
171 const std::string& printer_name) { 171 const std::string& printer_name) {
172 if (handler_) 172 if (handler_)
173 handler_->SendFailedToGetPrinterCapabilities(printer_name); 173 handler_->SendFailedToGetPrinterCapabilities(printer_name);
174 } 174 }
OLDNEW
« no previous file with comments | « no previous file | printing/backend/cups_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698