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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "printing/metafile.h" | 10 #include "printing/metafile.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 print_dialog_ = create_dialog_func_(this); | 121 print_dialog_ = create_dialog_func_(this); |
122 print_dialog_->AddRefToDialog(); | 122 print_dialog_->AddRefToDialog(); |
123 } | 123 } |
124 | 124 |
125 if (!print_dialog_->UpdateSettings(&settings_)) | 125 if (!print_dialog_->UpdateSettings(&settings_)) |
126 return OnError(); | 126 return OnError(); |
127 | 127 |
128 return OK; | 128 return OK; |
129 } | 129 } |
130 | 130 |
131 PrintingContext::Result PrintingContextLinux::InitWithSettings( | 131 void PrintingContextLinux::InitWithSettings(const PrintSettings& settings) { |
132 const PrintSettings& settings) { | |
133 DCHECK(!in_print_job_); | 132 DCHECK(!in_print_job_); |
134 | 133 |
135 settings_ = settings; | 134 settings_ = settings; |
136 | |
137 return OK; | |
138 } | 135 } |
139 | 136 |
140 PrintingContext::Result PrintingContextLinux::NewDocument( | 137 PrintingContext::Result PrintingContextLinux::NewDocument( |
141 const base::string16& document_name) { | 138 const base::string16& document_name) { |
142 DCHECK(!in_print_job_); | 139 DCHECK(!in_print_job_); |
143 in_print_job_ = true; | 140 in_print_job_ = true; |
144 | 141 |
145 document_name_ = document_name; | 142 document_name_ = document_name; |
146 | 143 |
147 return OK; | 144 return OK; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void PrintingContextLinux::ReleaseContext() { | 181 void PrintingContextLinux::ReleaseContext() { |
185 // Intentional No-op. | 182 // Intentional No-op. |
186 } | 183 } |
187 | 184 |
188 gfx::NativeDrawingContext PrintingContextLinux::context() const { | 185 gfx::NativeDrawingContext PrintingContextLinux::context() const { |
189 // Intentional No-op. | 186 // Intentional No-op. |
190 return NULL; | 187 return NULL; |
191 } | 188 } |
192 | 189 |
193 } // namespace printing | 190 } // namespace printing |
OLD | NEW |