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_cairo.h" | 5 #include "printing/printing_context_cairo.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/print_job_constants.h" | 10 #include "printing/print_job_constants.h" |
10 #include "printing/print_settings_initializer_gtk.h" | 11 #include "printing/print_settings_initializer_gtk.h" |
11 #include "printing/units.h" | 12 #include "printing/units.h" |
12 | 13 |
13 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
14 #include <unicode/ulocdata.h> | 15 #include <unicode/ulocdata.h> |
15 #else | 16 #else |
16 #include <gtk/gtk.h> | 17 #include <gtk/gtk.h> |
17 #include <gtk/gtkprintunixdialog.h> | 18 #include <gtk/gtkprintunixdialog.h> |
18 #include "printing/print_dialog_gtk_interface.h" | 19 #include "printing/print_dialog_gtk_interface.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #if !defined(OS_CHROMEOS) | 56 #if !defined(OS_CHROMEOS) |
56 // static | 57 // static |
57 void PrintingContextCairo::SetCreatePrintDialogFunction( | 58 void PrintingContextCairo::SetCreatePrintDialogFunction( |
58 PrintDialogGtkInterface* (*create_dialog_func)( | 59 PrintDialogGtkInterface* (*create_dialog_func)( |
59 PrintingContextCairo* context)) { | 60 PrintingContextCairo* context)) { |
60 DCHECK(create_dialog_func); | 61 DCHECK(create_dialog_func); |
61 DCHECK(!create_dialog_func_); | 62 DCHECK(!create_dialog_func_); |
62 create_dialog_func_ = create_dialog_func; | 63 create_dialog_func_ = create_dialog_func; |
63 } | 64 } |
64 | 65 |
65 void PrintingContextCairo::PrintDocument(const NativeMetafile* metafile) { | 66 void PrintingContextCairo::PrintDocument(const Metafile* metafile) { |
66 DCHECK(print_dialog_); | 67 DCHECK(print_dialog_); |
67 DCHECK(metafile); | 68 DCHECK(metafile); |
68 print_dialog_->PrintDocument(metafile, document_name_); | 69 print_dialog_->PrintDocument(metafile, document_name_); |
69 } | 70 } |
70 #endif // !defined(OS_CHROMEOS) | 71 #endif // !defined(OS_CHROMEOS) |
71 | 72 |
72 void PrintingContextCairo::AskUserForSettings( | 73 void PrintingContextCairo::AskUserForSettings( |
73 gfx::NativeView parent_view, | 74 gfx::NativeView parent_view, |
74 int max_pages, | 75 int max_pages, |
75 bool has_selection, | 76 bool has_selection, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 void PrintingContextCairo::ReleaseContext() { | 222 void PrintingContextCairo::ReleaseContext() { |
222 // Intentional No-op. | 223 // Intentional No-op. |
223 } | 224 } |
224 | 225 |
225 gfx::NativeDrawingContext PrintingContextCairo::context() const { | 226 gfx::NativeDrawingContext PrintingContextCairo::context() const { |
226 // Intentional No-op. | 227 // Intentional No-op. |
227 return NULL; | 228 return NULL; |
228 } | 229 } |
229 | 230 |
230 } // namespace printing | 231 } // namespace printing |
OLD | NEW |