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_gtk.h" | 5 #include "printing/printing_context_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 #include <gtk/gtkunixprint.h> | 8 #include <gtk/gtkunixprint.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 DCHECK(print_dialog_); | 55 DCHECK(print_dialog_); |
56 DCHECK(metafile); | 56 DCHECK(metafile); |
57 print_dialog_->PrintDocument(metafile, document_name_); | 57 print_dialog_->PrintDocument(metafile, document_name_); |
58 } | 58 } |
59 | 59 |
60 void PrintingContextGtk::AskUserForSettings( | 60 void PrintingContextGtk::AskUserForSettings( |
61 gfx::NativeView parent_view, | 61 gfx::NativeView parent_view, |
62 int max_pages, | 62 int max_pages, |
63 bool has_selection, | 63 bool has_selection, |
64 const PrintSettingsCallback& callback) { | 64 const PrintSettingsCallback& callback) { |
65 print_dialog_->ShowDialog(callback); | 65 print_dialog_->ShowDialog(has_selection, callback); |
66 } | 66 } |
67 | 67 |
68 PrintingContext::Result PrintingContextGtk::UseDefaultSettings() { | 68 PrintingContext::Result PrintingContextGtk::UseDefaultSettings() { |
69 DCHECK(!in_print_job_); | 69 DCHECK(!in_print_job_); |
70 | 70 |
71 ResetSettings(); | 71 ResetSettings(); |
72 if (!print_dialog_) { | 72 if (!print_dialog_) { |
73 print_dialog_ = create_dialog_func_(this); | 73 print_dialog_ = create_dialog_func_(this); |
74 print_dialog_->AddRefToDialog(); | 74 print_dialog_->AddRefToDialog(); |
75 } | 75 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // Intentional No-op. | 150 // Intentional No-op. |
151 } | 151 } |
152 | 152 |
153 gfx::NativeDrawingContext PrintingContextGtk::context() const { | 153 gfx::NativeDrawingContext PrintingContextGtk::context() const { |
154 // Intentional No-op. | 154 // Intentional No-op. |
155 return NULL; | 155 return NULL; |
156 } | 156 } |
157 | 157 |
158 } // namespace printing | 158 } // namespace printing |
159 | 159 |
OLD | NEW |