| 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 DCHECK(!show_system_dialog); |
| 174 DCHECK(!in_print_job_); | 176 DCHECK(!in_print_job_); |
| 175 | 177 |
| 176 // Intentional No-op. | 178 // Intentional No-op. |
| 177 | 179 |
| 178 return OK; | 180 return OK; |
| 179 } | 181 } |
| 180 | 182 |
| 181 PrintingContext::Result PrintingContextAndroid::InitWithSettings( | 183 PrintingContext::Result PrintingContextAndroid::InitWithSettings( |
| 182 const PrintSettings& settings) { | 184 const PrintSettings& settings) { |
| 183 DCHECK(!in_print_job_); | 185 DCHECK(!in_print_job_); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // Intentional No-op. | 239 // Intentional No-op. |
| 238 return NULL; | 240 return NULL; |
| 239 } | 241 } |
| 240 | 242 |
| 241 // static | 243 // static |
| 242 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) { | 244 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) { |
| 243 return RegisterNativesImpl(env); | 245 return RegisterNativesImpl(env); |
| 244 } | 246 } |
| 245 | 247 |
| 246 } // namespace printing | 248 } // namespace printing |
| OLD | NEW |