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 14 matching lines...) Expand all Loading... |
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 gfx::NativeView parent_view, | 32 gfx::NativeView parent_view, |
33 int max_pages, | 33 int max_pages, |
34 bool has_selection, | 34 bool has_selection, |
35 PrintSettingsCallback* callback) { | 35 const PrintSettingsCallback& callback) { |
36 // 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. |
37 callback->Run(OK); | 37 callback.Run(OK); |
38 } | 38 } |
39 | 39 |
40 PrintingContext::Result PrintingContextNoSystemDialog::UseDefaultSettings() { | 40 PrintingContext::Result PrintingContextNoSystemDialog::UseDefaultSettings() { |
41 DCHECK(!in_print_job_); | 41 DCHECK(!in_print_job_); |
42 | 42 |
43 ResetSettings(); | 43 ResetSettings(); |
44 // TODO(abodenha): Fetch these settings from the OS where possible. See | 44 // TODO(abodenha): Fetch these settings from the OS where possible. See |
45 // bug 102583. | 45 // bug 102583. |
46 // TODO(sanjeevr): We need a better feedback loop between the cloud print | 46 // TODO(sanjeevr): We need a better feedback loop between the cloud print |
47 // dialog and this code. | 47 // dialog and this code. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Intentional No-op. | 149 // Intentional No-op. |
150 } | 150 } |
151 | 151 |
152 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { | 152 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { |
153 // Intentional No-op. | 153 // Intentional No-op. |
154 return NULL; | 154 return NULL; |
155 } | 155 } |
156 | 156 |
157 } // namespace printing | 157 } // namespace printing |
158 | 158 |
OLD | NEW |