OLD | NEW |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // We don't actually care about the values. | 231 // We don't actually care about the values. |
232 std::string dummy_string; | 232 std::string dummy_string; |
233 if (!job_settings.GetBoolean(printing::kSettingLandscape, NULL) || | 233 if (!job_settings.GetBoolean(printing::kSettingLandscape, NULL) || |
234 !job_settings.GetBoolean(printing::kSettingCollate, NULL) || | 234 !job_settings.GetBoolean(printing::kSettingCollate, NULL) || |
235 !job_settings.GetBoolean(printing::kSettingColor, NULL) || | 235 !job_settings.GetBoolean(printing::kSettingColor, NULL) || |
236 !job_settings.GetBoolean(printing::kSettingPrintToPDF, NULL) || | 236 !job_settings.GetBoolean(printing::kSettingPrintToPDF, NULL) || |
237 !job_settings.GetBoolean(printing::kIsFirstRequest, NULL) || | 237 !job_settings.GetBoolean(printing::kIsFirstRequest, NULL) || |
238 !job_settings.GetString(printing::kSettingDeviceName, &dummy_string) || | 238 !job_settings.GetString(printing::kSettingDeviceName, &dummy_string) || |
239 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) || | 239 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) || |
240 !job_settings.GetInteger(printing::kSettingCopies, NULL) || | 240 !job_settings.GetInteger(printing::kSettingCopies, NULL) || |
| 241 !job_settings.GetString(printing::kPreviewUIAddr, &dummy_string) || |
241 !job_settings.GetInteger(printing::kPreviewRequestID, NULL)) { | 242 !job_settings.GetInteger(printing::kPreviewRequestID, NULL)) { |
242 return; | 243 return; |
243 } | 244 } |
244 | 245 |
245 // Just return the default settings. | 246 // Just return the default settings. |
246 if (printer_.get()) | 247 if (printer_.get()) |
247 printer_->UpdateSettings(document_cookie, params); | 248 printer_->UpdateSettings(document_cookie, params); |
248 } | 249 } |
249 | 250 |
250 void MockRenderThread::set_print_dialog_user_response(bool response) { | 251 void MockRenderThread::set_print_dialog_user_response(bool response) { |
251 print_dialog_user_response_ = response; | 252 print_dialog_user_response_ = response; |
252 } | 253 } |
253 | 254 |
254 int MockRenderThread::print_preview_pages_remaining() { | 255 int MockRenderThread::print_preview_pages_remaining() { |
255 return print_preview_pages_remaining_; | 256 return print_preview_pages_remaining_; |
256 } | 257 } |
OLD | NEW |