OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_linux.h" | 5 #include "printing/printing_context_linux.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "printing/metafile.h" | 9 #include "printing/metafile.h" |
10 #include "printing/print_dialog_gtk_interface.h" | 10 #include "printing/print_dialog_gtk_interface.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 // static | 54 // static |
55 void PrintingContextLinux::SetPdfPaperSizeFunction( | 55 void PrintingContextLinux::SetPdfPaperSizeFunction( |
56 gfx::Size (*get_pdf_paper_size)(PrintingContextLinux* context)) { | 56 gfx::Size (*get_pdf_paper_size)(PrintingContextLinux* context)) { |
57 DCHECK(get_pdf_paper_size); | 57 DCHECK(get_pdf_paper_size); |
58 DCHECK(!get_pdf_paper_size_); | 58 DCHECK(!get_pdf_paper_size_); |
59 get_pdf_paper_size_ = get_pdf_paper_size; | 59 get_pdf_paper_size_ = get_pdf_paper_size; |
60 } | 60 } |
61 | 61 |
62 void PrintingContextLinux::PrintDocument(const Metafile* metafile) { | 62 void PrintingContextLinux::PrintDocument(const MetafilePlayer& metafile) { |
63 DCHECK(print_dialog_); | 63 DCHECK(print_dialog_); |
64 DCHECK(metafile); | |
65 print_dialog_->PrintDocument(metafile, document_name_); | 64 print_dialog_->PrintDocument(metafile, document_name_); |
66 } | 65 } |
67 | 66 |
68 void PrintingContextLinux::AskUserForSettings( | 67 void PrintingContextLinux::AskUserForSettings( |
69 int max_pages, | 68 int max_pages, |
70 bool has_selection, | 69 bool has_selection, |
71 const PrintSettingsCallback& callback) { | 70 const PrintSettingsCallback& callback) { |
72 if (!print_dialog_) { | 71 if (!print_dialog_) { |
73 // Can only get here if the renderer is sending bad messages. | 72 // Can only get here if the renderer is sending bad messages. |
74 // http://crbug.com/341777 | 73 // http://crbug.com/341777 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void PrintingContextLinux::ReleaseContext() { | 181 void PrintingContextLinux::ReleaseContext() { |
183 // Intentional No-op. | 182 // Intentional No-op. |
184 } | 183 } |
185 | 184 |
186 gfx::NativeDrawingContext PrintingContextLinux::context() const { | 185 gfx::NativeDrawingContext PrintingContextLinux::context() const { |
187 // Intentional No-op. | 186 // Intentional No-op. |
188 return NULL; | 187 return NULL; |
189 } | 188 } |
190 | 189 |
191 } // namespace printing | 190 } // namespace printing |
OLD | NEW |