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" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "printing/metafile.h" | 12 #include "printing/metafile.h" |
13 #include "printing/print_dialog_gtk_interface.h" | 13 #include "printing/print_dialog_gtk_interface.h" |
14 #include "printing/print_job_constants.h" | 14 #include "printing/print_job_constants.h" |
15 #include "printing/units.h" | 15 #include "printing/units.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 // Function pointer for creating print dialogs. |callback| is only used when | 18 |
19 // |show_dialog| is true. | 19 // Function pointer for creating print dialogs. |callback| is only used when |
20 static printing::PrintDialogGtkInterface* (*create_dialog_func_)( | 20 // |show_dialog| is true. |
21 printing::PrintingContextGtk* context) = NULL; | 21 printing::PrintDialogGtkInterface* (*create_dialog_func_)( |
| 22 printing::PrintingContextGtk* context) = NULL; |
| 23 |
22 } // namespace | 24 } // namespace |
23 | 25 |
24 namespace printing { | 26 namespace printing { |
25 | 27 |
26 // static | 28 // static |
27 PrintingContext* PrintingContext::Create(const std::string& app_locale) { | 29 PrintingContext* PrintingContext::Create(const std::string& app_locale) { |
28 return static_cast<PrintingContext*>(new PrintingContextGtk(app_locale)); | 30 return static_cast<PrintingContext*>(new PrintingContextGtk(app_locale)); |
29 } | 31 } |
30 | 32 |
31 PrintingContextGtk::PrintingContextGtk(const std::string& app_locale) | 33 PrintingContextGtk::PrintingContextGtk(const std::string& app_locale) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // Intentional No-op. | 150 // Intentional No-op. |
149 } | 151 } |
150 | 152 |
151 gfx::NativeDrawingContext PrintingContextGtk::context() const { | 153 gfx::NativeDrawingContext PrintingContextGtk::context() const { |
152 // Intentional No-op. | 154 // Intentional No-op. |
153 return NULL; | 155 return NULL; |
154 } | 156 } |
155 | 157 |
156 } // namespace printing | 158 } // namespace printing |
157 | 159 |
OLD | NEW |