Chromium Code Reviews| 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 "printing/printing_context_mac.h" | 5 #include "printing/printing_context_mac.h" |
| 6 | 6 |
| 7 #import <ApplicationServices/ApplicationServices.h> | 7 #import <ApplicationServices/ApplicationServices.h> |
| 8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 !job_settings.GetBoolean(kSettingCollate, &collate) || | 119 !job_settings.GetBoolean(kSettingCollate, &collate) || |
| 120 !job_settings.GetInteger(kSettingColor, &color) || | 120 !job_settings.GetInteger(kSettingColor, &color) || |
| 121 !job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) || | 121 !job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) || |
| 122 !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) || | 122 !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) || |
| 123 !job_settings.GetInteger(kSettingCopies, &copies) || | 123 !job_settings.GetInteger(kSettingCopies, &copies) || |
| 124 !job_settings.GetString(kSettingDeviceName, &device_name)) { | 124 !job_settings.GetString(kSettingDeviceName, &device_name)) { |
| 125 return OnError(); | 125 return OnError(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool print_to_cloud = job_settings.HasKey(printing::kSettingCloudPrintId); | 128 bool print_to_cloud = job_settings.HasKey(printing::kSettingCloudPrintId); |
| 129 bool is_cloud_dialog = false; | |
| 130 job_settings.GetBoolean(printing::kSettingCloudPrintDialog, &is_cloud_dialog); | |
|
kmadhusu
2011/10/03 22:15:10
Please add this line to the previous if() conditio
Albert Bodenhamer
2011/10/03 22:38:39
Done.
| |
| 129 | 131 |
| 130 if (!print_to_pdf && !print_to_cloud) { | 132 if (!print_to_pdf && !print_to_cloud && !is_cloud_dialog) { |
| 131 if (!SetPrinter(device_name)) | 133 if (!SetPrinter(device_name)) |
| 132 return OnError(); | 134 return OnError(); |
| 133 | 135 |
| 134 if (!SetCopiesInPrintSettings(copies)) | 136 if (!SetCopiesInPrintSettings(copies)) |
| 135 return OnError(); | 137 return OnError(); |
| 136 | 138 |
| 137 if (!SetCollateInPrintSettings(collate)) | 139 if (!SetCollateInPrintSettings(collate)) |
| 138 return OnError(); | 140 return OnError(); |
| 139 | 141 |
| 140 if (!SetDuplexModeInPrintSettings( | 142 if (!SetDuplexModeInPrintSettings( |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 void PrintingContextMac::ReleaseContext() { | 379 void PrintingContextMac::ReleaseContext() { |
| 378 print_info_.reset(); | 380 print_info_.reset(); |
| 379 context_ = NULL; | 381 context_ = NULL; |
| 380 } | 382 } |
| 381 | 383 |
| 382 gfx::NativeDrawingContext PrintingContextMac::context() const { | 384 gfx::NativeDrawingContext PrintingContextMac::context() const { |
| 383 return context_; | 385 return context_; |
| 384 } | 386 } |
| 385 | 387 |
| 386 } // namespace printing | 388 } // namespace printing |
| OLD | NEW |