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

Side by Side Diff: chrome/renderer/mock_render_thread.cc

Issue 7826040: PrintPreview: Fixed RICOH MP C3501 color print job issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 3 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
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/renderer/mock_render_thread.h" 5 #include "chrome/renderer/mock_render_thread.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 void MockRenderThread::OnUpdatePrintSettings( 235 void MockRenderThread::OnUpdatePrintSettings(
236 int document_cookie, 236 int document_cookie,
237 const DictionaryValue& job_settings, 237 const DictionaryValue& job_settings,
238 PrintMsg_PrintPages_Params* params) { 238 PrintMsg_PrintPages_Params* params) {
239 // Check and make sure the required settings are all there. 239 // Check and make sure the required settings are all there.
240 // We don't actually care about the values. 240 // We don't actually care about the values.
241 std::string dummy_string; 241 std::string dummy_string;
242 if (!job_settings.GetBoolean(printing::kSettingLandscape, NULL) || 242 if (!job_settings.GetBoolean(printing::kSettingLandscape, NULL) ||
243 !job_settings.GetBoolean(printing::kSettingCollate, NULL) || 243 !job_settings.GetBoolean(printing::kSettingCollate, NULL) ||
244 !job_settings.GetBoolean(printing::kSettingColor, NULL) || 244 !job_settings.GetInteger(printing::kSettingColor, NULL) ||
245 !job_settings.GetBoolean(printing::kSettingPrintToPDF, NULL) || 245 !job_settings.GetBoolean(printing::kSettingPrintToPDF, NULL) ||
246 !job_settings.GetBoolean(printing::kIsFirstRequest, NULL) || 246 !job_settings.GetBoolean(printing::kIsFirstRequest, NULL) ||
247 !job_settings.GetString(printing::kSettingDeviceName, &dummy_string) || 247 !job_settings.GetString(printing::kSettingDeviceName, &dummy_string) ||
248 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) || 248 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) ||
249 !job_settings.GetInteger(printing::kSettingCopies, NULL) || 249 !job_settings.GetInteger(printing::kSettingCopies, NULL) ||
250 !job_settings.GetString(printing::kPreviewUIAddr, &dummy_string) || 250 !job_settings.GetString(printing::kPreviewUIAddr, &dummy_string) ||
251 !job_settings.GetInteger(printing::kPreviewRequestID, NULL)) { 251 !job_settings.GetInteger(printing::kPreviewRequestID, NULL)) {
252 return; 252 return;
253 } 253 }
254 254
(...skipping 27 matching lines...) Expand all
282 print_dialog_user_response_ = response; 282 print_dialog_user_response_ = response;
283 } 283 }
284 284
285 void MockRenderThread::set_print_preview_cancel_page_number(int page) { 285 void MockRenderThread::set_print_preview_cancel_page_number(int page) {
286 print_preview_cancel_page_number_ = page; 286 print_preview_cancel_page_number_ = page;
287 } 287 }
288 288
289 int MockRenderThread::print_preview_pages_remaining() { 289 int MockRenderThread::print_preview_pages_remaining() {
290 return print_preview_pages_remaining_; 290 return print_preview_pages_remaining_;
291 } 291 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698