OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_android.h" | 5 #include "printing/printing_context_android.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Convert this to pixels based on the dpi. | 163 // Convert this to pixels based on the dpi. |
164 float multiplier = 100 * settings_.device_units_per_inch(); | 164 float multiplier = 100 * settings_.device_units_per_inch(); |
165 multiplier /= kHundrethsMMPerInch; | 165 multiplier /= kHundrethsMMPerInch; |
166 width *= multiplier; | 166 width *= multiplier; |
167 height *= multiplier; | 167 height *= multiplier; |
168 } | 168 } |
169 return gfx::Size(width, height); | 169 return gfx::Size(width, height); |
170 } | 170 } |
171 | 171 |
172 PrintingContext::Result PrintingContextAndroid::UpdatePrinterSettings( | 172 PrintingContext::Result PrintingContextAndroid::UpdatePrinterSettings( |
173 bool external_preview) { | 173 bool external_preview, |
| 174 bool show_system_dialog, |
| 175 gfx::NativeView parent_view) { |
| 176 DCHECK(!show_system_dialog); |
174 DCHECK(!in_print_job_); | 177 DCHECK(!in_print_job_); |
175 | 178 |
176 // Intentional No-op. | 179 // Intentional No-op. |
177 | 180 |
178 return OK; | 181 return OK; |
179 } | 182 } |
180 | 183 |
181 PrintingContext::Result PrintingContextAndroid::InitWithSettings( | 184 PrintingContext::Result PrintingContextAndroid::InitWithSettings( |
182 const PrintSettings& settings) { | 185 const PrintSettings& settings) { |
183 DCHECK(!in_print_job_); | 186 DCHECK(!in_print_job_); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Intentional No-op. | 240 // Intentional No-op. |
238 return NULL; | 241 return NULL; |
239 } | 242 } |
240 | 243 |
241 // static | 244 // static |
242 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) { | 245 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) { |
243 return RegisterNativesImpl(env); | 246 return RegisterNativesImpl(env); |
244 } | 247 } |
245 | 248 |
246 } // namespace printing | 249 } // namespace printing |
OLD | NEW |