| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| 76 print_dialog_->UseDefaultSettings(); | 76 print_dialog_->UseDefaultSettings(); |
| 77 | 77 |
| 78 return OK; | 78 return OK; |
| 79 } | 79 } |
| 80 | 80 |
| 81 PrintingContext::Result PrintingContextGtk::UpdatePrinterSettings( | 81 PrintingContext::Result PrintingContextGtk::UpdatePrinterSettings( |
| 82 const DictionaryValue& job_settings, const PageRanges& ranges) { | 82 bool target_is_pdf, |
| 83 bool external_preview) { |
| 83 DCHECK(!in_print_job_); | 84 DCHECK(!in_print_job_); |
| 85 DCHECK(!external_preview) << "Not implemented"; |
| 84 | 86 |
| 85 if (!print_dialog_) { | 87 if (!print_dialog_) { |
| 86 print_dialog_ = create_dialog_func_(this); | 88 print_dialog_ = create_dialog_func_(this); |
| 87 print_dialog_->AddRefToDialog(); | 89 print_dialog_->AddRefToDialog(); |
| 88 } | 90 } |
| 89 | 91 |
| 90 if (!print_dialog_->UpdateSettings(job_settings, ranges, &settings_)) | 92 if (!print_dialog_->UpdateSettings(target_is_pdf, &settings_)) |
| 91 return OnError(); | 93 return OnError(); |
| 92 | 94 |
| 93 return OK; | 95 return OK; |
| 94 } | 96 } |
| 95 | 97 |
| 96 PrintingContext::Result PrintingContextGtk::InitWithSettings( | 98 PrintingContext::Result PrintingContextGtk::InitWithSettings( |
| 97 const PrintSettings& settings) { | 99 const PrintSettings& settings) { |
| 98 DCHECK(!in_print_job_); | 100 DCHECK(!in_print_job_); |
| 99 | 101 |
| 100 settings_ = settings; | 102 settings_ = settings; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // Intentional No-op. | 152 // Intentional No-op. |
| 151 } | 153 } |
| 152 | 154 |
| 153 gfx::NativeDrawingContext PrintingContextGtk::context() const { | 155 gfx::NativeDrawingContext PrintingContextGtk::context() const { |
| 154 // Intentional No-op. | 156 // Intentional No-op. |
| 155 return NULL; | 157 return NULL; |
| 156 } | 158 } |
| 157 | 159 |
| 158 } // namespace printing | 160 } // namespace printing |
| 159 | 161 |
| OLD | NEW |