| 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_no_system_dialog.h" | 5 #include "printing/printing_context_no_system_dialog.h" |
| 6 | 6 |
| 7 #include <unicode/ulocdata.h> | 7 #include <unicode/ulocdata.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 : PrintingContext(delegate) { | 24 : PrintingContext(delegate) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { | 27 PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { |
| 28 ReleaseContext(); | 28 ReleaseContext(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void PrintingContextNoSystemDialog::AskUserForSettings( | 31 void PrintingContextNoSystemDialog::AskUserForSettings( |
| 32 int max_pages, | 32 int max_pages, |
| 33 bool has_selection, | 33 bool has_selection, |
| 34 bool is_scripted, |
| 34 const PrintSettingsCallback& callback) { | 35 const PrintSettingsCallback& callback) { |
| 35 // We don't want to bring up a dialog here. Ever. Just signal the callback. | 36 // We don't want to bring up a dialog here. Ever. Just signal the callback. |
| 36 callback.Run(OK); | 37 callback.Run(OK); |
| 37 } | 38 } |
| 38 | 39 |
| 39 PrintingContext::Result PrintingContextNoSystemDialog::UseDefaultSettings() { | 40 PrintingContext::Result PrintingContextNoSystemDialog::UseDefaultSettings() { |
| 40 DCHECK(!in_print_job_); | 41 DCHECK(!in_print_job_); |
| 41 | 42 |
| 42 ResetSettings(); | 43 ResetSettings(); |
| 43 settings_.set_dpi(kDefaultPdfDpi); | 44 settings_.set_dpi(kDefaultPdfDpi); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // Intentional No-op. | 141 // Intentional No-op. |
| 141 } | 142 } |
| 142 | 143 |
| 143 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { | 144 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { |
| 144 // Intentional No-op. | 145 // Intentional No-op. |
| 145 return NULL; | 146 return NULL; |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace printing | 149 } // namespace printing |
| 149 | 150 |
| OLD | NEW |