OLD | NEW |
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_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" |
6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" |
7 | 7 |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 DictionaryValue* params = static_cast<DictionaryValue*>(parsed_value.get()); | 134 DictionaryValue* params = static_cast<DictionaryValue*>(parsed_value.get()); |
135 result &= params->GetDouble("dpi", ¶meters.dpi); | 135 result &= params->GetDouble("dpi", ¶meters.dpi); |
136 result &= params->GetDouble("min_shrink", ¶meters.min_shrink); | 136 result &= params->GetDouble("min_shrink", ¶meters.min_shrink); |
137 result &= params->GetDouble("max_shrink", ¶meters.max_shrink); | 137 result &= params->GetDouble("max_shrink", ¶meters.max_shrink); |
138 result &= params->GetBoolean("selection_only", ¶meters.selection_only); | 138 result &= params->GetBoolean("selection_only", ¶meters.selection_only); |
139 return result; | 139 return result; |
140 } | 140 } |
141 | 141 |
142 string16 GetSwitchValueString16(const CommandLine& command_line, | 142 string16 GetSwitchValueString16(const CommandLine& command_line, |
143 const char* switchName) { | 143 const char* switchName) { |
144 #ifdef OS_WIN | 144 #if defined(OS_WIN) |
145 CommandLine::StringType native_switch_val; | 145 CommandLine::StringType native_switch_val; |
146 native_switch_val = command_line.GetSwitchValueNative(switchName); | 146 native_switch_val = command_line.GetSwitchValueNative(switchName); |
147 return string16(native_switch_val); | 147 return string16(native_switch_val); |
148 #elif defined(OS_POSIX) | 148 #elif defined(OS_POSIX) |
149 // POSIX Command line string types are different. | 149 // POSIX Command line string types are different. |
150 CommandLine::StringType native_switch_val; | 150 CommandLine::StringType native_switch_val; |
151 native_switch_val = command_line.GetSwitchValueASCII(switchName); | 151 native_switch_val = command_line.GetSwitchValueASCII(switchName); |
152 // Convert the ASCII string to UTF16 to prepare to pass. | 152 // Convert the ASCII string to UTF16 to prepare to pass. |
153 return string16(ASCIIToUTF16(native_switch_val)); | 153 return string16(ASCIIToUTF16(native_switch_val)); |
154 #endif | 154 #endif |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 print_job_print_ticket, | 779 print_job_print_ticket, |
780 file_type, | 780 file_type, |
781 delete_on_close); | 781 delete_on_close); |
782 return true; | 782 return true; |
783 } | 783 } |
784 } | 784 } |
785 return false; | 785 return false; |
786 } | 786 } |
787 | 787 |
788 } // end namespace | 788 } // end namespace |
OLD | NEW |