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